summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-08-21 19:17:06 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-08-21 19:17:19 +0200
commit7ec4cfb73ca8ead1c816e3c7845211ddfb548a12 (patch)
tree98c5f1b7342f9fea4c0eddc7434e8af1e84f08c8
parentc095e1ea9a9e38f020ce4ae852d97c712be910b6 (diff)
Disable Go cache when running tests
By default, if the test executable and command line match a previous run and the files and environment variables consulted by that run have not changed either, go test will not really run tests but just print the previous test output. For more info, see https://golang.org/doc/go1.10#test Change-Id: Id37e1a8f7bdcb10584cc9c0f09f0558b319b793a Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index f7f7a9a..0b40731 100644
--- a/Makefile
+++ b/Makefile
@@ -119,11 +119,12 @@ xds: scripts tools/syncthing/copytobin
@echo "### Build XDS server (version $(VERSION), subversion $(SUB_VERSION)) - $(BUILD_MODE)";
@cd $(ROOT_SRCDIR); $(BUILD_ENV_FLAGS) go build $(VERBOSE_$(V)) -i -o $(LOCAL_BINDIR)/$(TARGET)$(EXT) -ldflags "$(GO_LDFLAGS) -X main.AppVersion=$(VERSION) -X main.AppSubVersion=$(SUB_VERSION)" -gcflags "$(GO_GCFLAGS)" .
+.PHONY: test
test: tools/glide
ifndef name
- go test --race ./test -v
+ GOCACHE=off go test --race ./test -v
else
- go test --race ./test -v -run $(name)
+ GOCACHE=off go test --race ./test -v -run $(name)
endif
vet: tools/glide