aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMatthias Rampke <mr@soundcloud.com>2017-08-24 07:13:17 +0000
committerBen Kochie <superq@gmail.com>2017-08-24 09:13:17 +0200
commitd3e3a9c1814f2f8d7908afaaadc8cd89e195f12a (patch)
tree6cbfb1c9d45778a37ba5ff3aa9f3bd6e71ba2c55 /Makefile
parent2ed98fd5a56532db672b57f855a28360a948cdff (diff)
downloadprometheus_node_collector-d3e3a9c1814f2f8d7908afaaadc8cd89e195f12a.tar.bz2
prometheus_node_collector-d3e3a9c1814f2f8d7908afaaadc8cd89e195f12a.tar.xz
prometheus_node_collector-d3e3a9c1814f2f8d7908afaaadc8cd89e195f12a.zip
Only cross-test 32bit on Linux (#658)
This doesn't work on at least FreeBSD and Darwin. It does work on Linux, only try it there.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index b10d5a4..b1d6d6b 100644
--- a/Makefile
+++ b/Makefile
@@ -41,10 +41,12 @@ endif
41# 64bit -> 32bit mapping for cross-checking. At least for amd64/386, the 64bit CPU can execute 32bit code but not the other way around, so we don't support cross-testing upwards. 41# 64bit -> 32bit mapping for cross-checking. At least for amd64/386, the 64bit CPU can execute 32bit code but not the other way around, so we don't support cross-testing upwards.
42cross-test = skip-test-32bit 42cross-test = skip-test-32bit
43define goarch_pair 43define goarch_pair
44ifeq ($$(GOARCH),$1) 44 ifeq ($$(OS_detected),Linux)
45 GOARCH_CROSS = $2 45 ifeq ($$(GOARCH),$1)
46 cross-test = test-32bit 46 GOARCH_CROSS = $2
47endif 47 cross-test = test-32bit
48 endif
49 endif
48endef 50endef
49 51
50# By default, "cross" test with ourselves to cover unknown pairings. 52# By default, "cross" test with ourselves to cover unknown pairings.
@@ -68,7 +70,7 @@ test-32bit: collector/fixtures/sys/.unpacked
68 @env GOARCH=$(GOARCH_CROSS) $(GO) test $(pkgs) 70 @env GOARCH=$(GOARCH_CROSS) $(GO) test $(pkgs)
69 71
70skip-test-32bit: 72skip-test-32bit:
71 @echo ">> SKIP running tests in 32-bit mode: not supported on $(GOARCH)" 73 @echo ">> SKIP running tests in 32-bit mode: not supported on $(OS_detected)/$(GOARCH)"
72 74
73collector/fixtures/sys/.unpacked: collector/fixtures/sys.ttar 75collector/fixtures/sys/.unpacked: collector/fixtures/sys.ttar
74 ./ttar -C collector/fixtures -x -f collector/fixtures/sys.ttar 76 ./ttar -C collector/fixtures -x -f collector/fixtures/sys.ttar