From 2cddd68686fa6fa6c97adcdc1c99bd07f5436feb Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 2 Apr 2014 11:44:04 +0200 Subject: [PATCH 1/3] Avoid injecting unfulfilled dependence in compiletest on libnative. --- src/compiletest/compiletest.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 1491555fea08c..d2499ea33bdd6 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -11,6 +11,9 @@ #![crate_type = "bin"] #![feature(phase)] +// we use our own (green) start below; do not link in libnative; issue #13247. +#![no_start] + #![allow(non_camel_case_types)] #![deny(warnings)] From 3cbd98e43f6436aaddd4f83860609f91dc517c92 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 2 Apr 2014 11:47:19 +0200 Subject: [PATCH 2/3] Two fixes to get `make check-stage1` working. 1. Fix a long-standing typo in the makefile: the relevant CTEST_NAME here is `rpass-full` (with a dash), not `rpass_full`. 2. The rpass-full tests depend on the complete set of target libraries. Therefore, the rpass-full tests need to use the dependencies held in the CSREQ-prefixed variable, not the TLIBRUSTC_DEFAULT-prefixed variable. --- mk/tests.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/tests.mk b/mk/tests.mk index 7fd6d148f3863..df6b7e93759e1 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -560,7 +560,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \ $$(CTEST_TESTARGS) CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS) -CTEST_DEPS_rpass_full_$(1)-T-$(2)-H-$(3) = $$(RPASS_FULL_TESTS) $$(TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3)) +CTEST_DEPS_rpass-full_$(1)-T-$(2)-H-$(3) = $$(RPASS_FULL_TESTS) $$(CSREQ$(1)_T_$(2)_H_$(3)) CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS) CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS) CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS) From 4edf7b8c3478365a3c327d7fe340447f9d328d37 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 2 Apr 2014 19:25:29 +0200 Subject: [PATCH 3/3] Fix android problems with newly fixed rpass-full variable definition. First, documented the existing `CTEST_DISABLE_$(TEST_GROUP)` pattern for conditionally disabling tests based on missing host features. Added variant of above, `CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP)`, which is only queried in contexts where the target is not on the CFG_HOST list (which I interpret as the list of targets that our host can compatibly emulate; e.g. the example that i686 and x86_64 can in theory run each others' tests). Driveby fix: Remove redundant copy of check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec dependency declaration. --- mk/tests.mk | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/mk/tests.mk b/mk/tests.mk index df6b7e93759e1..f1dc0fd561d12 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -370,8 +370,6 @@ $(foreach host,$(CFG_HOST), \ define DEF_TEST_CRATE_RULES check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)) -check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)) - $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)) @$$(call E, run: $$<) @@ -503,6 +501,10 @@ CTEST_BUILD_BASE_codegen = codegen CTEST_MODE_codegen = codegen CTEST_RUNTOOL_codegen = $(CTEST_RUNTOOL) +# CTEST_DISABLE_$(TEST_GROUP), if set, will cause the test group to be +# disabled and the associated message to be printed as a warning +# during attempts to run those tests. + ifeq ($(CFG_GDB),) CTEST_DISABLE_debuginfo = "no gdb found" endif @@ -515,6 +517,14 @@ ifeq ($(CFG_OSTYPE),apple-darwin) CTEST_DISABLE_debuginfo = "gdb on darwing needs root" endif +# CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP), if set, will cause that +# test group to be disabled *unless* the target is able to build a +# compiler (i.e. when the target triple is in the set of of host +# triples). The associated message will be printed as a warning +# during attempts to run those tests. + +CTEST_DISABLE_NONSELFHOST_rpass-full = "run-pass-full suite is unavailable when cross-compiling." + define DEF_CTEST_VARS # All the per-stage build rules you might want to call from the @@ -587,8 +597,28 @@ CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)) -ifeq ($$(CTEST_DISABLE_$(4)),) +# CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4) +# Goal: leave this variable as empty string if we should run the test. +# Otherwise, set it to the reason we are not running the test. +# (Encoded as a separate variable because GNU make does not have a +# good way to express OR on ifeq commands) +ifneq ($$(CTEST_DISABLE_$(4)),) +# Test suite is disabled for all configured targets. +CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4) := $$(CTEST_DISABLE_$(4)) +else +# else, check if non-self-hosted target (i.e. target not-in hosts) ... +ifeq ($$(findstring $(2),$$(CFG_HOST)),) +# ... if so, then check if this test suite is disabled for non-selfhosts. +ifneq ($$(CTEST_DISABLE_NONSELFHOST_$(4)),) +# Test suite is disabled for this target. +CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4) := $$(CTEST_DISABLE_NONSELFHOST_$(4)) +endif +endif +# Neither DISABLE nor DISABLE_NONSELFHOST is set ==> okay, run the test. +endif + +ifeq ($$(CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4)),) $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \ $$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \ $$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3)) @@ -600,11 +630,9 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \ else -$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \ - $$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \ - $$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3)) +$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): @$$(call E, run $(4) [$(2)]: $$<) - @$$(call E, warning: tests disabled: $$(CTEST_DISABLE_$(4))) + @$$(call E, warning: tests disabled: $$(CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4))) touch $$@ endif