mirror of
https://github.com/prometheus/node_exporter.git
synced 2025-02-21 03:25:57 -08:00
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.
This commit is contained in:
parent
2ed98fd5a5
commit
d3e3a9c181
8
Makefile
8
Makefile
|
@ -41,10 +41,12 @@ endif
|
||||||
# 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.
|
# 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.
|
||||||
cross-test = skip-test-32bit
|
cross-test = skip-test-32bit
|
||||||
define goarch_pair
|
define goarch_pair
|
||||||
ifeq ($$(GOARCH),$1)
|
ifeq ($$(OS_detected),Linux)
|
||||||
|
ifeq ($$(GOARCH),$1)
|
||||||
GOARCH_CROSS = $2
|
GOARCH_CROSS = $2
|
||||||
cross-test = test-32bit
|
cross-test = test-32bit
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# By default, "cross" test with ourselves to cover unknown pairings.
|
# By default, "cross" test with ourselves to cover unknown pairings.
|
||||||
|
@ -68,7 +70,7 @@ test-32bit: collector/fixtures/sys/.unpacked
|
||||||
@env GOARCH=$(GOARCH_CROSS) $(GO) test $(pkgs)
|
@env GOARCH=$(GOARCH_CROSS) $(GO) test $(pkgs)
|
||||||
|
|
||||||
skip-test-32bit:
|
skip-test-32bit:
|
||||||
@echo ">> SKIP running tests in 32-bit mode: not supported on $(GOARCH)"
|
@echo ">> SKIP running tests in 32-bit mode: not supported on $(OS_detected)/$(GOARCH)"
|
||||||
|
|
||||||
collector/fixtures/sys/.unpacked: collector/fixtures/sys.ttar
|
collector/fixtures/sys/.unpacked: collector/fixtures/sys.ttar
|
||||||
./ttar -C collector/fixtures -x -f collector/fixtures/sys.ttar
|
./ttar -C collector/fixtures -x -f collector/fixtures/sys.ttar
|
||||||
|
|
Loading…
Reference in a new issue