Skip to content

Commit 7b2a89f

Browse files
committed
test: Add a compile-fail-fulldeps test suite
Compile-fail tests for syntax extensions belong in this suite which has correct dependencies on all artifacts rather than just the target artifacts. Closes #13818
1 parent a3b28cb commit 7b2a89f

10 files changed

+13
-1
lines changed

configure

+1
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

+12-1
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 \
@@ -440,6 +441,8 @@ RPASS_RC := $(wildcard $(S)src/test/run-pass/*.rc)
440441
RPASS_RS := $(wildcard $(S)src/test/run-pass/*.rs)
441442
RPASS_FULL_RC := $(wildcard $(S)src/test/run-pass-fulldeps/*.rc)
442443
RPASS_FULL_RS := $(wildcard $(S)src/test/run-pass-fulldeps/*.rs)
444+
CFAIL_FULL_RC := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rc)
445+
CFAIL_FULL_RS := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rs)
443446
RFAIL_RC := $(wildcard $(S)src/test/run-fail/*.rc)
444447
RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
445448
CFAIL_RC := $(wildcard $(S)src/test/compile-fail/*.rc)
@@ -456,6 +459,7 @@ PERF_RS := $(wildcard $(S)src/test/bench/*.rs)
456459

457460
RPASS_TESTS := $(RPASS_RC) $(RPASS_RS)
458461
RPASS_FULL_TESTS := $(RPASS_FULL_RC) $(RPASS_FULL_RS)
462+
CFAIL_FULL_TESTS := $(CFAIL_FULL_RC) $(CFAIL_FULL_RS)
459463
RFAIL_TESTS := $(RFAIL_RC) $(RFAIL_RS)
460464
CFAIL_TESTS := $(CFAIL_RC) $(CFAIL_RS)
461465
BENCH_TESTS := $(BENCH_RS)
@@ -474,6 +478,11 @@ CTEST_BUILD_BASE_rpass-full = run-pass-fulldeps
474478
CTEST_MODE_rpass-full = run-pass
475479
CTEST_RUNTOOL_rpass-full = $(CTEST_RUNTOOL)
476480

481+
CTEST_SRC_BASE_cfail-full = compile-fail-fulldeps
482+
CTEST_BUILD_BASE_cfail-full = compile-fail-fulldeps
483+
CTEST_MODE_cfail-full = compile-fail
484+
CTEST_RUNTOOL_cfail-full = $(CTEST_RUNTOOL)
485+
477486
CTEST_SRC_BASE_rfail = run-fail
478487
CTEST_BUILD_BASE_rfail = run-fail
479488
CTEST_MODE_rfail = run-fail
@@ -572,6 +581,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
572581

573582
CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS)
574583
CTEST_DEPS_rpass-full_$(1)-T-$(2)-H-$(3) = $$(RPASS_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3))
584+
CTEST_DEPS_cfail-full_$(1)-T-$(2)-H-$(3) = $$(CFAIL_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3))
575585
CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS)
576586
CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS)
577587
CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS)
@@ -640,7 +650,7 @@ endif
640650

641651
endef
642652

643-
CTEST_NAMES = rpass rpass-full rfail cfail bench perf debuginfo codegen
653+
CTEST_NAMES = rpass rpass-full cfail-full rfail cfail bench perf debuginfo codegen
644654

645655
$(foreach host,$(CFG_HOST), \
646656
$(eval $(foreach target,$(CFG_TARGET), \
@@ -783,6 +793,7 @@ TEST_GROUPS = \
783793
$(foreach crate,$(TEST_DOC_CRATES),doc-crate-$(crate)) \
784794
rpass \
785795
rpass-full \
796+
cfail-full \
786797
rfail \
787798
cfail \
788799
bench \

0 commit comments

Comments
 (0)