From 43ca8d2e05882fbebb76de57b4ddce8c098dca70 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 7 May 2014 13:58:46 +0200 Subject: [PATCH 1/2] Fix `make check-stage2` by fixing deps of exported syntax cfail tests. Our `make check-stageN` for all N (including N=2) was not working, because there is an unspecified dependence from the cfail tests on certain crates that export syntax. We need to encode that dependence in some manner. The quick hack is to add `$$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3))` to the dependency list for *all* of the cfail tests. But I would prefer to not force the make logic to build all of the external crates before it gets to exercise the cfail tests. So, here is how this PR fixes the problem more properly: * Add `CTEST_DEPS_cfail-full` that, analogous to `CTEST_DEPS_rpass-full`, has a dependency on `$$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3))`. `CTEST_DEPS_cfail` is left unchanged (and thus continues to match the structure of `CTEST_DEPS_rpass`). * Added all of the other ingredients for `cfail-full` family of make logic. * moved cfail tests that rely on macros in separate crates to separate compile-fail-fulldeps/ directory. ---- (Landing this may or not be a prerequisite for landing PR #14000. In any case, this is a pretty isolated change and a net improvement in the overall structure for the tests, IMO, at least given what we currently have in the makefiles.) --- configure | 1 + mk/tests.mk | 13 ++++++++++++- .../syntax-extension-fourcc-bad-len.rs | 0 .../syntax-extension-fourcc-invalid-endian.rs | 0 .../syntax-extension-fourcc-non-ascii-str.rs | 0 .../syntax-extension-fourcc-non-literal.rs | 0 .../syntax-extension-fourcc-unsupported-literal.rs | 0 .../syntax-extension-hexfloat-bad-lits.rs | 0 .../syntax-extension-hexfloat-bad-types.rs | 0 .../syntax-extension-regex-invalid.rs | 0 10 files changed, 13 insertions(+), 1 deletion(-) rename src/test/{compile-fail => compile-fail-fulldeps}/syntax-extension-fourcc-bad-len.rs (100%) rename src/test/{compile-fail => compile-fail-fulldeps}/syntax-extension-fourcc-invalid-endian.rs (100%) rename src/test/{compile-fail => compile-fail-fulldeps}/syntax-extension-fourcc-non-ascii-str.rs (100%) rename src/test/{compile-fail => compile-fail-fulldeps}/syntax-extension-fourcc-non-literal.rs (100%) rename src/test/{compile-fail => compile-fail-fulldeps}/syntax-extension-fourcc-unsupported-literal.rs (100%) rename src/test/{compile-fail => compile-fail-fulldeps}/syntax-extension-hexfloat-bad-lits.rs (100%) rename src/test/{compile-fail => compile-fail-fulldeps}/syntax-extension-hexfloat-bad-types.rs (100%) rename src/test/{compile-fail => compile-fail-fulldeps}/syntax-extension-regex-invalid.rs (100%) diff --git a/configure b/configure index 983be4e8a0c0a..0f3561dd7b5c9 100755 --- a/configure +++ b/configure @@ -803,6 +803,7 @@ do make_dir $h/test/run-pass-fulldeps make_dir $h/test/run-fail make_dir $h/test/compile-fail + make_dir $h/test/compile-fail-fulldeps make_dir $h/test/bench make_dir $h/test/perf make_dir $h/test/pretty diff --git a/mk/tests.mk b/mk/tests.mk index d97a3799bd060..f4c2e488cdf9e 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -287,6 +287,7 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \ check-stage$(1)-T-$(2)-H-$(3)-rfail-exec \ check-stage$(1)-T-$(2)-H-$(3)-cfail-exec \ check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \ + check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec \ check-stage$(1)-T-$(2)-H-$(3)-rmake-exec \ check-stage$(1)-T-$(2)-H-$(3)-crates-exec \ check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \ @@ -454,6 +455,8 @@ RFAIL_RC := $(wildcard $(S)src/test/run-fail/*.rc) RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs) CFAIL_RC := $(wildcard $(S)src/test/compile-fail/*.rc) CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs) +CFAIL_FULL_RC := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rc) +CFAIL_FULL_RS := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rs) BENCH_RS := $(wildcard $(S)src/test/bench/*.rs) PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs) DEBUGINFO_RS := $(wildcard $(S)src/test/debug-info/*.rs) @@ -468,6 +471,7 @@ RPASS_TESTS := $(RPASS_RC) $(RPASS_RS) RPASS_FULL_TESTS := $(RPASS_FULL_RC) $(RPASS_FULL_RS) RFAIL_TESTS := $(RFAIL_RC) $(RFAIL_RS) CFAIL_TESTS := $(CFAIL_RC) $(CFAIL_RS) +CFAIL_FULL_TESTS := $(CFAIL_FULL_RC) $(CFAIL_FULL_RS) BENCH_TESTS := $(BENCH_RS) PERF_TESTS := $(PERF_RS) PRETTY_TESTS := $(PRETTY_RS) @@ -494,6 +498,11 @@ CTEST_BUILD_BASE_cfail = compile-fail CTEST_MODE_cfail = compile-fail CTEST_RUNTOOL_cfail = $(CTEST_RUNTOOL) +CTEST_SRC_BASE_cfail-full = compile-fail-fulldeps +CTEST_BUILD_BASE_cfail-full = compile-fail-fulldeps +CTEST_MODE_cfail-full = compile-fail +CTEST_RUNTOOL_cfail-full = $(CTEST_RUNTOOL) + CTEST_SRC_BASE_bench = bench CTEST_BUILD_BASE_bench = bench CTEST_MODE_bench = run-pass @@ -584,6 +593,7 @@ CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS) CTEST_DEPS_rpass-full_$(1)-T-$(2)-H-$(3) = $$(RPASS_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(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_cfail-full_$(1)-T-$(2)-H-$(3) = $$(CFAIL_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3)) CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS) CTEST_DEPS_perf_$(1)-T-$(2)-H-$(3) = $$(PERF_TESTS) CTEST_DEPS_debuginfo_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_TESTS) @@ -650,7 +660,7 @@ endif endef -CTEST_NAMES = rpass rpass-full rfail cfail bench perf debuginfo codegen +CTEST_NAMES = rpass rpass-full rfail cfail cfail-full bench perf debuginfo codegen $(foreach host,$(CFG_HOST), \ $(eval $(foreach target,$(CFG_TARGET), \ @@ -795,6 +805,7 @@ TEST_GROUPS = \ rpass-full \ rfail \ cfail \ + cfail-full \ bench \ perf \ rmake \ diff --git a/src/test/compile-fail/syntax-extension-fourcc-bad-len.rs b/src/test/compile-fail-fulldeps/syntax-extension-fourcc-bad-len.rs similarity index 100% rename from src/test/compile-fail/syntax-extension-fourcc-bad-len.rs rename to src/test/compile-fail-fulldeps/syntax-extension-fourcc-bad-len.rs diff --git a/src/test/compile-fail/syntax-extension-fourcc-invalid-endian.rs b/src/test/compile-fail-fulldeps/syntax-extension-fourcc-invalid-endian.rs similarity index 100% rename from src/test/compile-fail/syntax-extension-fourcc-invalid-endian.rs rename to src/test/compile-fail-fulldeps/syntax-extension-fourcc-invalid-endian.rs diff --git a/src/test/compile-fail/syntax-extension-fourcc-non-ascii-str.rs b/src/test/compile-fail-fulldeps/syntax-extension-fourcc-non-ascii-str.rs similarity index 100% rename from src/test/compile-fail/syntax-extension-fourcc-non-ascii-str.rs rename to src/test/compile-fail-fulldeps/syntax-extension-fourcc-non-ascii-str.rs diff --git a/src/test/compile-fail/syntax-extension-fourcc-non-literal.rs b/src/test/compile-fail-fulldeps/syntax-extension-fourcc-non-literal.rs similarity index 100% rename from src/test/compile-fail/syntax-extension-fourcc-non-literal.rs rename to src/test/compile-fail-fulldeps/syntax-extension-fourcc-non-literal.rs diff --git a/src/test/compile-fail/syntax-extension-fourcc-unsupported-literal.rs b/src/test/compile-fail-fulldeps/syntax-extension-fourcc-unsupported-literal.rs similarity index 100% rename from src/test/compile-fail/syntax-extension-fourcc-unsupported-literal.rs rename to src/test/compile-fail-fulldeps/syntax-extension-fourcc-unsupported-literal.rs diff --git a/src/test/compile-fail/syntax-extension-hexfloat-bad-lits.rs b/src/test/compile-fail-fulldeps/syntax-extension-hexfloat-bad-lits.rs similarity index 100% rename from src/test/compile-fail/syntax-extension-hexfloat-bad-lits.rs rename to src/test/compile-fail-fulldeps/syntax-extension-hexfloat-bad-lits.rs diff --git a/src/test/compile-fail/syntax-extension-hexfloat-bad-types.rs b/src/test/compile-fail-fulldeps/syntax-extension-hexfloat-bad-types.rs similarity index 100% rename from src/test/compile-fail/syntax-extension-hexfloat-bad-types.rs rename to src/test/compile-fail-fulldeps/syntax-extension-hexfloat-bad-types.rs diff --git a/src/test/compile-fail/syntax-extension-regex-invalid.rs b/src/test/compile-fail-fulldeps/syntax-extension-regex-invalid.rs similarity index 100% rename from src/test/compile-fail/syntax-extension-regex-invalid.rs rename to src/test/compile-fail-fulldeps/syntax-extension-regex-invalid.rs From 1fb2c681b06569201d5b48cc96698d2de37673d1 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 7 May 2014 14:40:50 +0200 Subject: [PATCH 2/2] Improve descriptions of `SREQ` and `CSREQ` to make difference clearer. --- mk/main.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/main.mk b/mk/main.mk index 685dd0b51829b..e96442fcf06bb 100644 --- a/mk/main.mk +++ b/mk/main.mk @@ -321,14 +321,14 @@ TSREQ$(1)_T_$(2)_H_$(3) = \ $$(TLIB$(1)_T_$(2)_H_$(3))/libcompiler-rt.a # Prerequisites for a working stageN compiler and libraries, for a specific -# target +# target. Note that only-host crates are not included (see crates.mk). SREQ$(1)_T_$(2)_H_$(3) = \ $$(TSREQ$(1)_T_$(2)_H_$(3)) \ $$(foreach dep,$$(TARGET_CRATES),\ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep)) # Prerequisites for a working stageN compiler and complete set of target -# libraries +# libraries, including both only-host and non-host crates. CSREQ$(1)_T_$(2)_H_$(3) = \ $$(TSREQ$(1)_T_$(2)_H_$(3)) \ $$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \