diff options
author | Matthias Rampke <mr@soundcloud.com> | 2017-08-24 07:13:17 +0000 |
---|---|---|
committer | Ben Kochie <superq@gmail.com> | 2017-08-24 09:13:17 +0200 |
commit | d3e3a9c1814f2f8d7908afaaadc8cd89e195f12a (patch) | |
tree | 6cbfb1c9d45778a37ba5ff3aa9f3bd6e71ba2c55 /Makefile | |
parent | 2ed98fd5a56532db672b57f855a28360a948cdff (diff) | |
download | prometheus_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-- | Makefile | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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. |
42 | cross-test = skip-test-32bit | 42 | cross-test = skip-test-32bit |
43 | define goarch_pair | 43 | define goarch_pair |
44 | ifeq ($$(GOARCH),$1) | 44 | ifeq ($$(OS_detected),Linux) |
45 | GOARCH_CROSS = $2 | 45 | ifeq ($$(GOARCH),$1) |
46 | cross-test = test-32bit | 46 | GOARCH_CROSS = $2 |
47 | endif | 47 | cross-test = test-32bit |
48 | endif | ||
49 | endif | ||
48 | endef | 50 | endef |
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 | ||
70 | skip-test-32bit: | 72 | skip-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 | ||
73 | collector/fixtures/sys/.unpacked: collector/fixtures/sys.ttar | 75 | collector/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 |