@@ -389,10 +389,11 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
389
389
$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) : \
390
390
$(3 ) /stage$(1 ) /test/$(4 ) test-$(2 )$$(X_$(2 ) )
391
391
@$$(call E, run: $$< )
392
+ $$(Q ) touch $$@ .start_time
392
393
$$(Q )$$(call CFG_RUN_TEST_$(2 ) ,$$< ,$(1 ) ,$(2 ) ,$(3 ) ) $$(TESTARGS ) \
393
394
--logfile $$(call TEST_LOG_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) \
394
395
$$(call CRATE_TEST_EXTRA_ARGS,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) \
395
- && touch $$@
396
+ && touch -r $$@ .start_time $$@ && rm $$@ .start_time
396
397
endef
397
398
398
399
define 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
401
402
$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) : \
402
403
$(3 ) /stage$(1 ) /test/$(4 ) test-$(2 )$$(X_$(2 ) )
403
404
@$$(call E, run: $$< via adb)
405
+ $$(Q ) touch $$@ .start_time
404
406
$$(Q )$(CFG_ADB ) push $$< $(CFG_ADB_TEST_DIR )
405
407
$$(Q )$(CFG_ADB ) shell '(cd $(CFG_ADB_TEST_DIR ) ; LD_LIBRARY_PATH=./$(2 ) \
406
408
./$$(notdir $$< ) \
@@ -414,7 +416,7 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
414
416
@if grep -q "result: ok" tmp/check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) .tmp; \
415
417
then \
416
418
rm tmp/check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) .tmp; \
417
- touch $$@ ; \
419
+ touch -r $$@ .start_time $$@ && rm $$@ .start_time ; \
418
420
else \
419
421
rm tmp/check-stage$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) .tmp; \
420
422
exit 101; \
@@ -690,10 +692,11 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
690
692
$$(TEST_SREQ$(1 ) _T_$(2 ) _H_$(3 ) ) \
691
693
$$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
692
694
@$$(call E, run $(4) [$(2)]: $$<)
695
+ $$(Q)touch $$@.start_time
693
696
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
694
697
$$(CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \
695
698
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
696
- && touch $$@
699
+ && touch -r $$@.start_time $$@ && rm $$@.start_time
697
700
698
701
else
699
702
@@ -750,10 +753,11 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
750
753
$$(PRETTY_DEPS_$(4 ) ) \
751
754
$$(PRETTY_DEPS$(1 ) _H_$(3 ) _$(4 ) )
752
755
@$$(call E, run pretty-rpass [$(2 ) ]: $$< )
756
+ $$(Q ) touch $$@ .start_time
753
757
$$(Q )$$(call CFG_RUN_CTEST_$(2 ) ,$(1 ) ,$$< ,$(3 ) ) \
754
758
$$(PRETTY_ARGS$(1 ) -T-$(2 ) -H-$(3 ) -$(4 ) ) \
755
759
--logfile $$(call TEST_LOG_FILE,$(1 ) ,$(2 ) ,$(3 ) ,$(4 ) ) \
756
- && touch $$@
760
+ && touch -r $$@ .start_time $$@ && rm $$@ .start_time
757
761
758
762
endef
759
763
@@ -799,8 +803,10 @@ endif
799
803
ifeq ($(2 ) ,$$(CFG_BUILD ) )
800
804
$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,doc-$(4 ) ) : $$(DOCTESTDEP_$(1 ) _$(2 ) _$(3 ) _$(4 ) )
801
805
@$$(call E, run doc-$(4 ) [$(2 ) ])
806
+ $$(Q ) touch $$@ .start_time
802
807
$$(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
804
810
else
805
811
$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,doc-$(4 ) ) :
806
812
touch $$@
@@ -835,9 +841,11 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-crate-$(4)-exec: \
835
841
ifeq ($(2 ) ,$$(CFG_BUILD ) )
836
842
$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,doc-crate-$(4 ) ) : $$(CRATEDOCTESTDEP_$(1 ) _$(2 ) _$(3 ) _$(4 ) )
837
843
@$$(call E, run doc-crate-$(4 ) [$(2 ) ])
844
+ $$(Q ) touch $$@ .start_time
838
845
$$(Q ) CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3 ) ) \
839
846
$$(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
841
849
else
842
850
$$(call TEST_OK_FILE,$(1 ) ,$(2 ) ,$(3 ) ,doc-crate-$(4 ) ) :
843
851
touch $$@
@@ -984,6 +992,7 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
984
992
$$(CSREQ$(1 ) _T_$(2 ) _H_$(3 ) )
985
993
@rm -rf $(3 ) /test/run-make/$$*
986
994
@mkdir -p $(3 ) /test/run-make/$$*
995
+ $$(Q ) touch $$@ .start_time
987
996
$$(Q )$$(CFG_PYTHON ) $(S ) src/etc/maketest.py $$(dir $$< ) \
988
997
$$(MAKE) \
989
998
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
@@ -996,7 +1005,7 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
996
1005
"$$(LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3))" \
997
1006
$(1) \
998
1007
$$(S)
999
- @touch $$@
1008
+ @touch -r $$@.start_time $$@ && rm $$@.start_time
1000
1009
else
1001
1010
# FIXME #11094 - The above rule doesn't work right for multiple targets
1002
1011
check-stage$(1 ) -T-$(2 ) -H-$(3 ) -rmake-exec :
0 commit comments