Skip to content

Commit a8a5694

Browse files
committed
---
yaml --- r: 4333 b: refs/heads/master c: 59691b0 h: refs/heads/master i: 4331: 6992501 v: v3
1 parent 0015db8 commit a8a5694

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 1653f3f1a950e3817793401e5a05932c18c0db4f
2+
refs/heads/master: 59691b084fd64c6e98c36f8c738abe4a6fe6f89e

trunk/mk/tests.mk

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ COMPILETEST_INPUTS := $(wildcard $(S)src/test/compiletest/*rs)
5151
STDTEST_CRATE := $(S)src/test/stdtest/stdtest.rc
5252
STDTEST_INPUTS := $(wildcard $(S)src/test/stdtest/*rs)
5353

54+
# Run the compiletest runner itself under valgrind
55+
ifdef CTEST_VALGRIND
56+
CFG_RUN_CTEST=$(call CFG_RUN_TEST,$(2))
57+
else
58+
CFG_RUN_CTEST=$(call CFG_RUN,stage$(1)/lib,$(2))
59+
endif
5460

5561
######################################################################
5662
# Main test targets
@@ -188,31 +194,31 @@ test/compiletest.stage$(2)$$(X): $$(COMPILETEST_CRATE) \
188194
test/compile-fail.stage$(2).out.tmp: test/compiletest.stage$(2)$$(X) \
189195
$$(CFAIL_TESTS)
190196
@$$(call E, run: $$<)
191-
$$(Q)$$(call CFG_RUN_TEST,$$<) $$(CFAIL_ARGS$(2))
197+
$$(Q)$$(call CFG_RUN_CTEST,$(2),$$<) $$(CFAIL_ARGS$(2))
192198
$$(Q)touch $$@
193199

194200
test/run-fail.stage$(2).out.tmp: test/compiletest.stage$(2)$$(X) \
195201
$$(RFAIL_TESTS)
196202
@$$(call E, run: $$<)
197-
$$(Q)$$(call CFG_RUN_TEST,$$<) $$(RFAIL_ARGS$(2))
203+
$$(Q)$$(call CFG_RUN_CTEST,$(2),$$<) $$(RFAIL_ARGS$(2))
198204
$$(Q)touch $$@
199205

200206
test/run-pass.stage$(2).out.tmp: test/compiletest.stage$(2)$$(X) \
201207
$$(RPASS_TESTS)
202208
@$$(call E, run: $$<)
203-
$$(Q)$$(call CFG_RUN_TEST,$$<) $$(RPASS_ARGS$(2))
209+
$$(Q)$$(call CFG_RUN_CTEST,$(2),$$<) $$(RPASS_ARGS$(2))
204210
$$(Q)touch $$@
205211

206212
test/bench.stage$(2).out.tmp: test/compiletest.stage$(2)$$(X) \
207213
$$(BENCH_TESTS)
208214
@$$(call E, run: $$<)
209-
$$(Q)$$(call CFG_RUN_TEST,$$<) $$(BENCH_ARGS$(2))
215+
$$(Q)$$(call CFG_RUN_CTEST,$(2),$$<) $$(BENCH_ARGS$(2))
210216
$$(Q)touch $$@
211217

212218
test/pretty.stage$(2).out.tmp: test/compiletest.stage$(2)$$(X) \
213219
$$(RPASS_TESTS)
214220
@$$(call E, run: $$<)
215-
$$(Q)$$(call CFG_RUN_TEST,$$<) $$(PRETTY_ARGS$(2))
221+
$$(Q)$$(call CFG_RUN_CTEST,$(2),$$<) $$(PRETTY_ARGS$(2))
216222
$$(Q)touch $$@
217223

218224
endef

0 commit comments

Comments
 (0)