From 6e55426c8c1cda45a99eef7974274c37579d0ccb Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 28 Nov 2011 21:23:42 -0800 Subject: [PATCH] tweak to get windows test-running correct --- mk/platform.mk | 6 +++--- mk/tests.mk | 8 ++++---- src/etc/snapshot.py | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/mk/platform.mk b/mk/platform.mk index 2b790794072..375cbf26a73 100644 --- a/mk/platform.mk +++ b/mk/platform.mk @@ -101,7 +101,7 @@ else CFG_GCCISH_CFLAGS += -O2 endif -CFG_TESTLIB=$(CFG_BUILD_DIR)/$(CFG_HOST_TRIPLE)/$(strip \ +CFG_TESTLIB=$(CFG_BUILD_DIR)/$(2)/$(strip \ $(if $(findstring stage0,$(1)), \ stage0/lib, \ $(if $(findstring stage1,$(1)), \ @@ -158,8 +158,8 @@ ifdef CFG_WINDOWSY CFG_DEF_SUFFIX := .def CFG_LDPATH :=$(CFG_LDPATH):$$PATH CFG_RUN=PATH="$(CFG_LDPATH):$(1)" $(2) - CFG_RUN_TARG=$(call CFG_RUN,$(HOST_LIB$(1)),$(2)) - CFG_RUN_TEST=$(call CFG_RUN,$(call CFG_TESTLIB,$(1)),$(1)) + CFG_RUN_TARG=$(call CFG_RUN,$(HLIB$(1)_H_$(CFG_HOST_TRIPLE)),$(2)) + CFG_RUN_TEST=$(call CFG_RUN,$(call CFG_TESTLIB,$(1),$(3)),$(1)) CFG_LIBUV_LINK_FLAGS=-lWs2_32 ifndef CFG_ENABLE_MINGW_CROSS diff --git a/mk/tests.mk b/mk/tests.mk index 19c9522ccaf..ca3f1485da9 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -62,7 +62,7 @@ STDTEST_INPUTS := $(wildcard $(S)src/test/stdtest/*rs) # Run the compiletest runner itself under valgrind ifdef CTEST_VALGRIND - CFG_RUN_CTEST=$(call CFG_RUN_TEST,$(2)) + CFG_RUN_CTEST=$(call CFG_RUN_TEST,$(2),$(3)) else CFG_RUN_CTEST=$(call CFG_RUN,$(TLIB$(1)_T_$(3)_H_$(3)),$(2)) endif @@ -174,7 +174,7 @@ $(3)/test/stdtest.stage$(1)-$(2)$$(X): \ check-stage$(1)-T-$(2)-H-$(3)-std-dummy: \ $(3)/test/stdtest.stage$(1)-$(2)$$(X) @$$(call E, run: $$<) - $$(Q)$$(call CFG_RUN_TEST,$$<) $$(TESTARGS) + $$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) $$(TESTARGS) # Rules for the rustc test runner @@ -189,7 +189,7 @@ $(3)/test/rustctest.stage$(1)-$(2)$$(X): \ check-stage$(1)-T-$(2)-H-$(3)-rustc-dummy: \ $(3)/test/rustctest.stage$(1)-$(2)$$(X) @$$(call E, run: $$<) - $$(Q)$$(call CFG_RUN_TEST,$$<) $$(TESTARGS) + $$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) $$(TESTARGS) # Rules for the cfail/rfail/rpass/bench/perf test runner @@ -395,4 +395,4 @@ test/$(FT_DRIVER)$(X): test/$(FT_DRIVER).rs $(TARGET_HOST_LIB2)/$(FT_LIB) \ $(STAGE2_$(CFG_HOST_TRIPLE)) -L $(HOST_LIB2) -o $@ $< test/$(FT_DRIVER).out: test/$(FT_DRIVER)$(X) $(SREQ2$(CFG_HOST_TRIPLE)) - $(Q)$(call CFG_RUN_TEST, $<) + $(Q)$(call CFG_RUN_TEST,$<,$(CFG_HOST_TRIPLE),$(CFG_HOST_TRIPLE)) diff --git a/src/etc/snapshot.py b/src/etc/snapshot.py index 3ee3ca36e63..3ad64d8bed9 100644 --- a/src/etc/snapshot.py +++ b/src/etc/snapshot.py @@ -56,7 +56,8 @@ def full_snapshot_name(date, rev, platform, hsh): def get_kernel(triple): os_name = triple.split('-')[-1] - if os_name == "nt" or scrub(os.getenv("CFG_ENABLE_MINGW_CROSS")): + #scrub(os.getenv("CFG_ENABLE_MINGW_CROSS")): + if os_name == "nt" or os_name == "mingw32": return "winnt" if os_name == "darwin": return "macos"