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

Commit

Permalink
Speed up test
Browse files Browse the repository at this point in the history
  • Loading branch information
Xu Ning committed Apr 19, 2017
1 parent b249347 commit a39b0f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ install:

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

after_success:
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
Expand Down
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,21 @@ 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:
cover_profile: lint $(DEPS)
@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

0 comments on commit a39b0f3

Please sign in to comment.