@@ -199,14 +199,29 @@ check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
199
199
200
200
# Some less critical tests that are not prone to breakage.
201
201
# Not run as part of the normal test suite, but tested by bors on checkin.
202
- check-secondary : check-lexer check-pretty
202
+ check-secondary : check-build-compiletest check- lexer check-pretty
203
203
204
204
# check + check-secondary.
205
- check-all : check check-secondary
205
+ #
206
+ # Issue #17883: build check-secondary first so hidden dependencies in
207
+ # e.g. building compiletest are exercised (resolve those by adding
208
+ # deps to rules that need them; not by putting `check` first here).
209
+ check-all : check-secondary check
206
210
207
211
# Pretty-printing tests.
208
212
check-pretty : check-stage2-T-$(CFG_BUILD ) -H-$(CFG_BUILD ) -pretty-exec
209
213
214
+ define DEF_CHECK_BUILD_COMPILETEST_FOR_STAGE
215
+ check-stage$(1 ) -build-compiletest: $$(HBIN$(1 ) _H_$(CFG_BUILD ) ) /compiletest$$(X_$(CFG_BUILD ) )
216
+ endef
217
+
218
+ $(foreach stage,$(STAGES), \
219
+ $(eval $(call DEF_CHECK_BUILD_COMPILETEST_FOR_STAGE,$(stage))))
220
+
221
+ check-build-compiletest : \
222
+ check-stage1-build-compiletest \
223
+ check-stage2-build-compiletest
224
+
210
225
.PHONY : cleantmptestlogs cleantestlibs
211
226
212
227
cleantmptestlogs :
@@ -720,6 +735,13 @@ PRETTY_DEPS_pretty-rpass-full = $(RPASS_FULL_TESTS)
720
735
PRETTY_DEPS_pretty-rfail = $(RFAIL_TESTS )
721
736
PRETTY_DEPS_pretty-bench = $(BENCH_TESTS )
722
737
PRETTY_DEPS_pretty-pretty = $(PRETTY_TESTS )
738
+ # The stage- and host-specific dependencies are for e.g. macro_crate_test which pulls in
739
+ # external crates.
740
+ PRETTY_DEPS$(1)_H_$(3)_pretty-rpass =
741
+ PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full = $$(HLIB$(1 ) _H_$(3 ) ) /stamp.syntax $$(HLIB$(1 ) _H_$(3 ) ) /stamp.rustc
742
+ PRETTY_DEPS$(1)_H_$(3)_pretty-rfail =
743
+ PRETTY_DEPS$(1)_H_$(3)_pretty-bench =
744
+ PRETTY_DEPS$(1)_H_$(3)_pretty-pretty =
723
745
PRETTY_DIRNAME_pretty-rpass = run-pass
724
746
PRETTY_DIRNAME_pretty-rpass-full = run-pass-fulldeps
725
747
PRETTY_DIRNAME_pretty-rfail = run-fail
@@ -738,7 +760,8 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
738
760
739
761
$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) : \
740
762
$$(TEST_SREQ$(1 ) _T_$(2 ) _H_$(3 ) ) \
741
- $$(PRETTY_DEPS_$(4 ) )
763
+ $$(PRETTY_DEPS_$(4 ) ) \
764
+ $$(PRETTY_DEPS$(1 ) _H_$(3 ) _$(4 ) )
742
765
@$$(call E, run pretty-rpass [$(2 ) ]: $$< )
743
766
$$(Q )$$(call CFG_RUN_CTEST_$(2 ) ,$(1 ) ,$$< ,$(3 ) ) \
744
767
$$(PRETTY_ARGS$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) ) \
0 commit comments