Skip to content

Commit 2453079

Browse files
committed
Change rmake and doc-test to support TESTNAME
Closes #11288 Closes #11222
1 parent a1cb8dc commit 2453079

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

mk/tests.mk

+3-3
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)): \
768768
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3))
769769
@$$(call E, run doc-$(4) [$(2)])
770770
$$(Q)$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) --test \
771-
$$(CRATE_DOC_LIB-$(4)) && touch $$@
771+
$$(CRATE_DOC_LIB-$(4)) --test-args "$$(TESTARGS)" && touch $$@
772772
else
773773
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)):
774774
touch $$@
@@ -970,12 +970,12 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
970970
$$(CSREQ$(1)_T_$(2)_H_$(3))
971971
@rm -rf $(3)/test/run-make/$$*
972972
@mkdir -p $(3)/test/run-make/$$*
973-
@echo maketest: $$*
974973
$$(Q)$$(CFG_PYTHON) $(S)src/etc/maketest.py $$(dir $$<) \
975974
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
976975
$(3)/test/run-make/$$* \
977976
"$$(CC_$(3)) $$(CFG_GCCISH_CFLAGS_$(3))" \
978-
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3))
977+
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
978+
"$$(TESTNAME)"
979979
@touch $$@
980980
else
981981
# FIXME #11094 - The above rule doesn't work right for multiple targets

src/etc/maketest.py

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
os.putenv('TMPDIR', os.path.abspath(sys.argv[3]))
99
os.putenv('CC', sys.argv[4])
1010
os.putenv('RUSTDOC', os.path.abspath(sys.argv[5]))
11+
filt = sys.argv[6]
12+
13+
if not filt in sys.argv[1]:
14+
sys.exit(0)
15+
print('maketest: ' + os.path.basename(os.path.dirname(sys.argv[1])))
1116

1217
proc = subprocess.Popen(['make', '-C', sys.argv[1]],
1318
stdout = subprocess.PIPE,

0 commit comments

Comments
 (0)