@@ -389,10 +389,11 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
389389$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) : \
390390 $(3 ) /stage$(1 ) /test/$(4 ) test-$(2 )$$(X_$(2 ) )
391391 @$$(call E, run: $$< )
392+ $$(Q ) touch $$@ .start_time
392393 $$(Q )$$(call CFG_RUN_TEST_$(2 ) ,$$< ,$(1 ) ,$(2 ) ,$(3 ) ) $$(TESTARGS ) \
393394 --logfile $$(call TEST_LOG_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) \
394395 $$(call CRATE_TEST_EXTRA_ARGS,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) \
395- && touch $$@
396+ && touch -r $$@ .start_time $$@ && rm $$@ .start_time
396397endef
397398
398399define DEF_TEST_CRATE_RULES_android
@@ -401,6 +402,7 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
401402$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) : \
402403 $(3 ) /stage$(1 ) /test/$(4 ) test-$(2 )$$(X_$(2 ) )
403404 @$$(call E, run: $$< via adb)
405+ $$(Q ) touch $$@ .start_time
404406 $$(Q )$(CFG_ADB ) push $$< $(CFG_ADB_TEST_DIR )
405407 $$(Q )$(CFG_ADB ) shell '(cd $(CFG_ADB_TEST_DIR ) ; LD_LIBRARY_PATH=./$(2 ) \
406408 ./$$(notdir $$< ) \
@@ -414,7 +416,7 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
414416 @if grep -q "result: ok" tmp/check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) .tmp; \
415417 then \
416418 rm tmp/check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) .tmp; \
417- touch $$@ ; \
419+ touch -r $$@ .start_time $$@ && rm $$@ .start_time ; \
418420 else \
419421 rm tmp/check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) .tmp; \
420422 exit 101; \
@@ -690,10 +692,11 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
690692 $$(TEST_SREQ$(1 ) _T_$(2 ) _H_$(3 ) ) \
691693 $$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
692694 @$$(call E, run $(4) [$(2)]: $$<)
695+ 693696 $$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
694697 $$(CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \
695698 --logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
696- && touch $$@
699+ && touch
-r $$@
.start_time $$@ && rm [email protected] _time 697700
698701else
699702
@@ -750,10 +753,11 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
750753 $$(PRETTY_DEPS_$(4 ) ) \
751754 $$(PRETTY_DEPS$(1 ) _H_$(3 ) _$(4 ) )
752755 @$$(call E, run pretty-rpass [$(2 ) ]: $$< )
756+ $$(Q ) touch $$@ .start_time
753757 $$(Q )$$(call CFG_RUN_CTEST_$(2 ) ,$(1 ) ,$$< ,$(3 ) ) \
754758 $$(PRETTY_ARGS$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) ) \
755759 --logfile $$(call TEST_LOG_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) \
756- && touch $$@
760+ && touch -r $$@ .start_time $$@ && rm $$@ .start_time
757761
758762endef
759763
@@ -799,8 +803,10 @@ endif
799803ifeq ($(2 ) ,$$(CFG_BUILD ) )
800804$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,doc-$(4 ) ) : $$(DOCTESTDEP_$(1 ) _$(2 ) _$(3 ) _$(4 ) )
801805 @$$(call E, run doc-$(4 ) [$(2 ) ])
806+ $$(Q ) touch $$@ .start_time
802807 $$(Q )$$(RUSTDOC_$(1 ) _T_$(2 ) _H_$(3 ) ) --cfg dox --test $$< \
803- --test-args " $$ (TESTARGS)" && touch $$@
808+ --test-args " $$ (TESTARGS)" && \
809+ touch -r $$@ .start_time $$@ && rm $$@ .start_time
804810else
805811$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,doc-$(4 ) ) :
806812 touch $$@
@@ -835,9 +841,11 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-crate-$(4)-exec: \
835841ifeq ($(2 ) ,$$(CFG_BUILD ) )
836842$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,doc-crate-$(4 ) ) : $$(CRATEDOCTESTDEP_$(1 ) _$(2 ) _$(3 ) _$(4 ) )
837843 @$$(call E, run doc-crate-$(4 ) [$(2 ) ])
844+ $$(Q ) touch $$@ .start_time
838845 $$(Q ) CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3 ) ) \
839846 $$(RUSTDOC_$(1 ) _T_$(2 ) _H_$(3 ) ) --test --cfg dox \
840- $$(CRATEFILE_$(4 ) ) --test-args " $$ (TESTARGS)" && touch $$@
847+ $$(CRATEFILE_$(4 ) ) --test-args " $$ (TESTARGS)" && \
848+ touch -r $$@ .start_time $$@ && rm $$@ .start_time
841849else
842850$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,doc-crate-$(4 ) ) :
843851 touch $$@
@@ -984,6 +992,7 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
984992 $$(CSREQ$(1 ) _T_$(2 ) _H_$(3 ) )
985993 @rm -rf $(3 ) /test/run-make/$$*
986994 @mkdir -p $(3 ) /test/run-make/$$*
995+ $$(Q ) touch $$@ .start_time
987996 $$(Q )$$(CFG_PYTHON ) $(S ) src/etc/maketest.py $$(dir $$< ) \
988997 $$(MAKE) \
989998 $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
@@ -996,7 +1005,7 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
9961005 "$$(LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3))" \
9971006 $(1) \
9981007 $$(S)
999- @touch $$@
1008+ @touch
-r $$@
.start_time $$@ && rm [email protected] _time 10001009else
10011010# FIXME #11094 - The above rule doesn't work right for multiple targets
10021011check-stage$(1 ) -T-$(2 ) -H-$(3 ) -rmake-exec :
0 commit comments