diff --git a/.travis.yml b/.travis.yml index 0c0c240e3..323b8b369 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,13 +29,13 @@ script: - export GO111MODULE=on # Run unit tests with race condition detector. - - 'if [ "$RACE" = true ]; then make btcd && make unit-race ; fi' + - 'if [ "$RACE" = true ]; then make travis-race ; fi' # Run integration tests. - - 'if [ "$ITEST" = true ]; then make btcd && make build && make itest-only; fi' + - 'if [ "$ITEST" = true ]; then make itest; fi' # Run unit tests and generate coverage report. - - 'if [ "$COVER" = true ]; then make btcd && make lint && make unit-cover && make goveralls; fi' + - 'if [ "$COVER" = true ]; then make travis-cover; fi' after_script: - echo "Uploading to termbin.com..." && find *.log | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'" diff --git a/Makefile b/Makefile index fe0c04293..d3422eab9 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,6 @@ XARGS := xargs -L 1 include make/testing_flags.mk DEV_TAGS := $(if ${tags},$(DEV_TAGS) ${tags},$(DEV_TAGS)) -PROD_TAGS := $(if ${tags},$(PROD_TAGS) ${tags},$(PROD_TAGS)) COVER = for dir in $(GOLISTCOVER); do \ $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" \ @@ -96,7 +95,7 @@ $(LINT_BIN): GO111MODULE=off go get -u $(LINT_PKG) btcd: - @$(call print, "Installing btcd...") + @$(call print, "Installing btcd.") go get -v github.com/btcsuite/btcd/@v0.0.0-20180823030728-$(BTCD_COMMIT) # ============ @@ -110,8 +109,8 @@ build: install: @$(call print, "Installing lnd and lncli.") - $(GOINSTALL) -tags="$(PROD_TAGS)" $(LDFLAGS) $(PKG) - $(GOINSTALL) -tags="$(PROD_TAGS)" $(LDFLAGS) $(PKG)/cmd/lncli + $(GOINSTALL) -tags="${tags}" $(LDFLAGS) $(PKG) + $(GOINSTALL) -tags="${tags}" $(LDFLAGS) $(PKG)/cmd/lncli scratch: build @@ -146,6 +145,10 @@ goveralls: $(GOVERALLS_BIN) @$(call print, "Sending coverage report.") $(GOVERALLS_BIN) -coverprofile=profile.cov -service=travis-ci +travis-race: btcd unit-race + +travis-cover: btcd lint unit-cover goveralls + # ============= # FLAKE HUNTING # ============= @@ -202,6 +205,8 @@ clean: unit-cover \ unit-race \ goveralls \ + travis-race \ + travis-cover \ flakehunter \ flake-unit \ fmt \ diff --git a/make/testing_flags.mk b/make/testing_flags.mk index 1eedc3df4..8c6964414 100644 --- a/make/testing_flags.mk +++ b/make/testing_flags.mk @@ -1,5 +1,4 @@ DEV_TAGS = dev -PROD_TAGS = prod LOG_TAGS = TEST_FLAGS =