From b05367409513e5d902d81bbdae6683e48369d59f Mon Sep 17 00:00:00 2001 From: Jakub Matys Date: Fri, 13 Apr 2018 16:29:00 +0200 Subject: [PATCH 1/2] use -short flag for testing by default and clean vendor in build env. --- Makefile | 3 +++ build/bin/Makefile | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 00e051c8..806bbaad 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,9 @@ build-debug: .bin-image test: .bin-image docker run -t --rm -e PACKAGER=$(PACKAGER) -v $(CURDIR):/src $(BIN_IMAGE) make test +test-all: .bin-image + docker run -t --rm -e PACKAGER=$(PACKAGER) -v $(CURDIR):/src $(BIN_IMAGE) make test-all + deb: .deb-image docker run -t --rm -e PACKAGER=$(PACKAGER) -v $(CURDIR):/src -v $(CURDIR)/build:/out $(DEB_IMAGE) diff --git a/build/bin/Makefile b/build/bin/Makefile index 7d4efd84..386d9fa1 100644 --- a/build/bin/Makefile +++ b/build/bin/Makefile @@ -9,9 +9,13 @@ build-debug: prepare-sources chown $(PACKAGER) /out/blockbook test: prepare-sources + cd $(GOPATH)/src/blockbook && go test -v -short ./... + +test-all: prepare-sources cd $(GOPATH)/src/blockbook && go test -v ./... prepare-sources: @ [ -n "`ls /src 2> /dev/null`" ] || (echo "/src doesn't exist or is empty" 1>&2 && exit 1) cp -r /src $(GOPATH)/src/blockbook + rm -rf $(GOPATH)/src/blockbook/vendor cd $(GOPATH)/src/blockbook && dep ensure -vendor-only From 466ed7912dcf7313270c6ff24326477a43f62a42 Mon Sep 17 00:00:00 2001 From: Jakub Matys Date: Fri, 13 Apr 2018 16:34:56 +0200 Subject: [PATCH 2/2] removed verbose output of test targets --- build/bin/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/bin/Makefile b/build/bin/Makefile index 386d9fa1..932285c9 100644 --- a/build/bin/Makefile +++ b/build/bin/Makefile @@ -9,10 +9,10 @@ build-debug: prepare-sources chown $(PACKAGER) /out/blockbook test: prepare-sources - cd $(GOPATH)/src/blockbook && go test -v -short ./... + cd $(GOPATH)/src/blockbook && go test -short ./... test-all: prepare-sources - cd $(GOPATH)/src/blockbook && go test -v ./... + cd $(GOPATH)/src/blockbook && go test ./... prepare-sources: @ [ -n "`ls /src 2> /dev/null`" ] || (echo "/src doesn't exist or is empty" 1>&2 && exit 1)