@@ -333,21 +333,22 @@ $(foreach host,$(CFG_HOST), \
333
333
334
334
define TEST_RUNNER
335
335
336
- # If NO_REBUILD is set then break the dependencies on extra so we can
337
- # test crates without rebuilding std and extra first
336
+ # If NO_REBUILD is set then break the dependencies on everything but
337
+ # the source files so we can test crates without rebuilding any of the
338
+ # parent crates.
338
339
ifeq ($(NO_REBUILD ) ,)
339
- STDTESTDEP_ $(1)_$(2)_$(3)_$(4) = $$(SREQ$(1 ) _T_$(2 ) _H_$(3 ) ) \
340
+ TESTDEP_ $(1)_$(2)_$(3)_$(4) = $$(SREQ$(1 ) _T_$(2 ) _H_$(3 ) ) \
340
341
$$(foreach crate,$$(TARGET_CRATES ) ,\
341
- $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /stamp.$$(crate ) )
342
+ $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /stamp.$$(crate ) ) \
343
+ $$(CRATE_FULLDEPS_$(1 ) _T_$(2 ) _H_$(3 ) _$(4 ) )
342
344
else
343
- STDTESTDEP_ $(1)_$(2)_$(3)_$(4) =
345
+ TESTDEP_ $(1)_$(2)_$(3)_$(4) = $$( RSINPUTS_ $( 4 ) )
344
346
endif
345
347
346
348
$(3 ) /stage$(1 ) /test/$(4 ) test-$(2 )$$(X_$(2 ) ) : CFG_COMPILER = $(2 )
347
349
$(3 ) /stage$(1 ) /test/$(4 ) test-$(2 )$$(X_$(2 ) ) : \
348
- $$(CRATEFILE_$(4 ) ) \
349
- $$(CRATE_FULLDEPS_$(1 ) _T_$(2 ) _H_$(3 ) _$(4 ) ) \
350
- $$(STDTESTDEP_$(1 ) _$(2 ) _$(3 ) _$(4 ) )
350
+ $$(CRATEFILE_$(4 ) ) \
351
+ $$(TESTDEP_$(1 ) _$(2 ) _$(3 ) _$(4 ) )
351
352
@$$(call E, oxidize: $$@ )
352
353
$$(STAGE$(1 ) _T_$(2 ) _H_$(3 ) ) -o $$@ $$< --test \
353
354
-L "$$(RT_OUTPUT_DIR_$(2 ) ) " \
@@ -684,13 +685,22 @@ $(foreach host,$(CFG_HOST), \
684
685
685
686
define DEF_CRATE_DOC_TEST
686
687
688
+ # If NO_REBUILD is set then break the dependencies on everything but
689
+ # the source files so we can test crate documentation without
690
+ # rebuilding any of the parent crates.
691
+ ifeq ($(NO_REBUILD ) ,)
692
+ DOCTESTDEP_$(1)_$(2)_$(3)_$(4) = \
693
+ $$(TEST_SREQ$(1 ) _T_$(2 ) _H_$(3 ) ) \
694
+ $$(CRATE_FULLDEPS_$(1 ) _T_$(2 ) _H_$(3 ) _$(4 ) ) \
695
+ $$(HBIN$(1 ) _H_$(3 ) ) /rustdoc$$(X_$(3 ) )
696
+ else
697
+ DOCTESTDEP_$(1)_$(2)_$(3)_$(4) = $$(RSINPUTS_$(4 ) )
698
+ endif
699
+
687
700
check-stage$(1 ) -T-$(2 ) -H-$(3 ) -doc-$(4 ) -exec: $$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,doc-$(4 ) )
688
701
689
702
ifeq ($(2 ) ,$$(CFG_BUILD ) )
690
- $$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,doc-$(4 ) ) : \
691
- $$(TEST_SREQ$(1 ) _T_$(2 ) _H_$(3 ) ) \
692
- $$(CRATE_FULLDEPS_$(1 ) _T_$(2 ) _H_$(3 ) _$(4 ) ) \
693
- $$(HBIN$(1 ) _H_$(3 ) ) /rustdoc$$(X_$(3 ) )
703
+ $$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,doc-$(4 ) ) : $$(DOCTESTDEP_$(1 ) _$(2 ) _$(3 ) _$(4 ) )
694
704
@$$(call E, run doc-$(4 ) [$(2 ) ])
695
705
$$(Q )$$(HBIN$(1 ) _H_$(3 ) ) /rustdoc$$(X_$(3 ) ) --test \
696
706
$$(CRATEFILE_$(4 ) ) --test-args " $$ (TESTARGS)" && touch $$@
0 commit comments