Skip to content

Commit 43ca8d2

Browse files
committed
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 rust-lang#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.)
1 parent 2dcbad5 commit 43ca8d2

10 files changed

+13
-1
lines changed

configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,7 @@ do
803803
make_dir $h/test/run-pass-fulldeps
804804
make_dir $h/test/run-fail
805805
make_dir $h/test/compile-fail
806+
make_dir $h/test/compile-fail-fulldeps
806807
make_dir $h/test/bench
807808
make_dir $h/test/perf
808809
make_dir $h/test/pretty

mk/tests.mk

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
287287
check-stage$(1)-T-$(2)-H-$(3)-rfail-exec \
288288
check-stage$(1)-T-$(2)-H-$(3)-cfail-exec \
289289
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
290+
check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec \
290291
check-stage$(1)-T-$(2)-H-$(3)-rmake-exec \
291292
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
292293
check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \
@@ -454,6 +455,8 @@ RFAIL_RC := $(wildcard $(S)src/test/run-fail/*.rc)
454455
RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
455456
CFAIL_RC := $(wildcard $(S)src/test/compile-fail/*.rc)
456457
CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
458+
CFAIL_FULL_RC := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rc)
459+
CFAIL_FULL_RS := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rs)
457460
BENCH_RS := $(wildcard $(S)src/test/bench/*.rs)
458461
PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
459462
DEBUGINFO_RS := $(wildcard $(S)src/test/debug-info/*.rs)
@@ -468,6 +471,7 @@ RPASS_TESTS := $(RPASS_RC) $(RPASS_RS)
468471
RPASS_FULL_TESTS := $(RPASS_FULL_RC) $(RPASS_FULL_RS)
469472
RFAIL_TESTS := $(RFAIL_RC) $(RFAIL_RS)
470473
CFAIL_TESTS := $(CFAIL_RC) $(CFAIL_RS)
474+
CFAIL_FULL_TESTS := $(CFAIL_FULL_RC) $(CFAIL_FULL_RS)
471475
BENCH_TESTS := $(BENCH_RS)
472476
PERF_TESTS := $(PERF_RS)
473477
PRETTY_TESTS := $(PRETTY_RS)
@@ -494,6 +498,11 @@ CTEST_BUILD_BASE_cfail = compile-fail
494498
CTEST_MODE_cfail = compile-fail
495499
CTEST_RUNTOOL_cfail = $(CTEST_RUNTOOL)
496500

501+
CTEST_SRC_BASE_cfail-full = compile-fail-fulldeps
502+
CTEST_BUILD_BASE_cfail-full = compile-fail-fulldeps
503+
CTEST_MODE_cfail-full = compile-fail
504+
CTEST_RUNTOOL_cfail-full = $(CTEST_RUNTOOL)
505+
497506
CTEST_SRC_BASE_bench = bench
498507
CTEST_BUILD_BASE_bench = bench
499508
CTEST_MODE_bench = run-pass
@@ -584,6 +593,7 @@ CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS)
584593
CTEST_DEPS_rpass-full_$(1)-T-$(2)-H-$(3) = $$(RPASS_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3))
585594
CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS)
586595
CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS)
596+
CTEST_DEPS_cfail-full_$(1)-T-$(2)-H-$(3) = $$(CFAIL_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3))
587597
CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS)
588598
CTEST_DEPS_perf_$(1)-T-$(2)-H-$(3) = $$(PERF_TESTS)
589599
CTEST_DEPS_debuginfo_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_TESTS)
@@ -650,7 +660,7 @@ endif
650660

651661
endef
652662

653-
CTEST_NAMES = rpass rpass-full rfail cfail bench perf debuginfo codegen
663+
CTEST_NAMES = rpass rpass-full rfail cfail cfail-full bench perf debuginfo codegen
654664

655665
$(foreach host,$(CFG_HOST), \
656666
$(eval $(foreach target,$(CFG_TARGET), \
@@ -795,6 +805,7 @@ TEST_GROUPS = \
795805
rpass-full \
796806
rfail \
797807
cfail \
808+
cfail-full \
798809
bench \
799810
perf \
800811
rmake \

0 commit comments

Comments
 (0)