Skip to content

Commit

Permalink
Fix make check-stage2 by fixing deps of exported syntax cfail tests.
Browse files Browse the repository at this point in the history
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.)
  • Loading branch information
pnkfelix committed May 7, 2014
1 parent 2dcbad5 commit 43ca8d2
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 12 additions & 1 deletion mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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), \
Expand Down Expand Up @@ -795,6 +805,7 @@ TEST_GROUPS = \
rpass-full \
rfail \
cfail \
cfail-full \
bench \
perf \
rmake \
Expand Down

0 comments on commit 43ca8d2

Please sign in to comment.