aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/prometheus/procfs/Makefile.common
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/prometheus/procfs/Makefile.common')
-rw-r--r--vendor/github.com/prometheus/procfs/Makefile.common20
1 files changed, 16 insertions, 4 deletions
diff --git a/vendor/github.com/prometheus/procfs/Makefile.common b/vendor/github.com/prometheus/procfs/Makefile.common
index 066866e..b978dfc 100644
--- a/vendor/github.com/prometheus/procfs/Makefile.common
+++ b/vendor/github.com/prometheus/procfs/Makefile.common
@@ -69,6 +69,15 @@ else
69 GO_BUILD_PLATFORM ?= $(GOHOSTOS)-$(GOHOSTARCH) 69 GO_BUILD_PLATFORM ?= $(GOHOSTOS)-$(GOHOSTARCH)
70endif 70endif
71 71
72GOTEST := $(GO) test
73GOTEST_DIR :=
74ifneq ($(CIRCLE_JOB),)
75ifneq ($(shell which gotestsum),)
76 GOTEST_DIR := test-results
77 GOTEST := gotestsum --junitfile $(GOTEST_DIR)/unit-tests.xml --
78endif
79endif
80
72PROMU_VERSION ?= 0.5.0 81PROMU_VERSION ?= 0.5.0
73PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz 82PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz
74 83
@@ -142,14 +151,17 @@ else
142endif 151endif
143 152
144.PHONY: common-test-short 153.PHONY: common-test-short
145common-test-short: 154common-test-short: $(GOTEST_DIR)
146 @echo ">> running short tests" 155 @echo ">> running short tests"
147 GO111MODULE=$(GO111MODULE) $(GO) test -short $(GOOPTS) $(pkgs) 156 GO111MODULE=$(GO111MODULE) $(GOTEST) -short $(GOOPTS) $(pkgs)
148 157
149.PHONY: common-test 158.PHONY: common-test
150common-test: 159common-test: $(GOTEST_DIR)
151 @echo ">> running all tests" 160 @echo ">> running all tests"
152 GO111MODULE=$(GO111MODULE) $(GO) test $(test-flags) $(GOOPTS) $(pkgs) 161 GO111MODULE=$(GO111MODULE) $(GOTEST) $(test-flags) $(GOOPTS) $(pkgs)
162
163$(GOTEST_DIR):
164 @mkdir -p $@
153 165
154.PHONY: common-format 166.PHONY: common-format
155common-format: 167common-format: