Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Speed up test by reordering integration test first, then unit test #157

Merged
merged 1 commit into from
Apr 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ install:
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`pwd`"

script:
- EMBEDROCKSDB=0 make cover_ci
- EMBEDROCKSDB=0 make -j2 cover_ci

after_success:
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
Expand Down
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,20 @@ cherami-store-tool: $(DEPS)
bins: cherami-server cherami-replicator-server cherami-cli cherami-admin cherami-replicator-tool cherami-cassandra-tool cherami-store-tool

cover_profile: lint bins
@echo Running tests:
@mkdir -p $(BUILD)
@echo "mode: atomic" > $(BUILD)/cover.out
@for dir in $(PKG_TEST_DIRS); do \

@echo Running integration tests:
@time for dir in $(INTEG_TEST_DIRS); do \
mkdir -p $(BUILD)/"$$dir"; \
go test $(EMBED) "$$dir" $(TEST_ARG) -coverprofile=$(BUILD)/"$$dir"/coverage.out || exit 1; \
go test $(EMBED) "$$dir" $(TEST_ARG) $(GOCOVERPKG_ARG) -coverprofile=$(BUILD)/"$$dir"/coverage.out || exit 1; \
cat $(BUILD)/"$$dir"/coverage.out | grep -v "mode: atomic" >> $(BUILD)/cover.out; \
done
@echo Running integration tests:
@for dir in $(INTEG_TEST_DIRS); do \

@echo Running tests:
@time for dir in $(PKG_TEST_DIRS); do \
mkdir -p $(BUILD)/"$$dir"; \
go test $(EMBED) "$$dir" $(TEST_ARG) $(GOCOVERPKG_ARG) -coverprofile=$(BUILD)/"$$dir"/coverage.out || exit 1; \
go test $(EMBED) "$$dir" $(TEST_ARG) -coverprofile=$(BUILD)/"$$dir"/coverage.out || exit 1; \
cat $(BUILD)/"$$dir"/coverage.out | grep -v "mode: atomic" >> $(BUILD)/cover.out; \
done

Expand Down