Merge pull request #2249 from cfromknecht/makefile-cleanup

Makefile: use travis targets, remove unnecessary symbols
This commit is contained in:
Olaoluwa Osuntokun 2018-11-30 16:26:45 -08:00 committed by GitHub
commit 7a39131a85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 8 deletions

@ -29,13 +29,13 @@ script:
- export GO111MODULE=on - export GO111MODULE=on
# Run unit tests with race condition detector. # 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. # 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. # 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: after_script:
- echo "Uploading to termbin.com..." && find *.log | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'" - echo "Uploading to termbin.com..." && find *.log | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"

@ -42,7 +42,6 @@ XARGS := xargs -L 1
include make/testing_flags.mk include make/testing_flags.mk
DEV_TAGS := $(if ${tags},$(DEV_TAGS) ${tags},$(DEV_TAGS)) DEV_TAGS := $(if ${tags},$(DEV_TAGS) ${tags},$(DEV_TAGS))
PROD_TAGS := $(if ${tags},$(PROD_TAGS) ${tags},$(PROD_TAGS))
COVER = for dir in $(GOLISTCOVER); do \ COVER = for dir in $(GOLISTCOVER); do \
$(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" \ $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" \
@ -96,7 +95,7 @@ $(LINT_BIN):
GO111MODULE=off go get -u $(LINT_PKG) GO111MODULE=off go get -u $(LINT_PKG)
btcd: btcd:
@$(call print, "Installing btcd...") @$(call print, "Installing btcd.")
go get -v github.com/btcsuite/btcd/@v0.0.0-20180823030728-$(BTCD_COMMIT) go get -v github.com/btcsuite/btcd/@v0.0.0-20180823030728-$(BTCD_COMMIT)
# ============ # ============
@ -110,8 +109,8 @@ build:
install: install:
@$(call print, "Installing lnd and lncli.") @$(call print, "Installing lnd and lncli.")
$(GOINSTALL) -tags="$(PROD_TAGS)" $(LDFLAGS) $(PKG) $(GOINSTALL) -tags="${tags}" $(LDFLAGS) $(PKG)
$(GOINSTALL) -tags="$(PROD_TAGS)" $(LDFLAGS) $(PKG)/cmd/lncli $(GOINSTALL) -tags="${tags}" $(LDFLAGS) $(PKG)/cmd/lncli
scratch: build scratch: build
@ -146,6 +145,10 @@ goveralls: $(GOVERALLS_BIN)
@$(call print, "Sending coverage report.") @$(call print, "Sending coverage report.")
$(GOVERALLS_BIN) -coverprofile=profile.cov -service=travis-ci $(GOVERALLS_BIN) -coverprofile=profile.cov -service=travis-ci
travis-race: btcd unit-race
travis-cover: btcd lint unit-cover goveralls
# ============= # =============
# FLAKE HUNTING # FLAKE HUNTING
# ============= # =============
@ -202,6 +205,8 @@ clean:
unit-cover \ unit-cover \
unit-race \ unit-race \
goveralls \ goveralls \
travis-race \
travis-cover \
flakehunter \ flakehunter \
flake-unit \ flake-unit \
fmt \ fmt \

@ -1,5 +1,4 @@
DEV_TAGS = dev DEV_TAGS = dev
PROD_TAGS = prod
LOG_TAGS = LOG_TAGS =
TEST_FLAGS = TEST_FLAGS =