use -short flag for testing by default and clean vendor in build env.

This commit is contained in:
Jakub Matys 2018-04-13 16:29:00 +02:00
parent 7b97f8a929
commit b053674095
2 changed files with 7 additions and 0 deletions

View File

@ -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)

View File

@ -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