Skip to content

Commit 6cab5bb

Browse files
committed
Rollup merge of #22341 - fhahn:issue-22291-PLEASE-FAIL, r=alexcrichton
This is a patch for #22291. PLEASE_BENCH=1 adds --bench to the arguments passed to the executable to be tested. At the moment, compiletest does not accept a --bench argument, because it is not needed for any test in src/test/, even the tests in src/test/bench do not use #[bench]. I have updated the makefile to only add the --bench flag for crate tests. I do not think that changing compiletest add --bench to the run arguments of all compile tests makes sense, because it would mess up tests which check command line arguments. Also the bench option can be added as comment in a compile test as well.
2 parents b0d2c6a + ff1181d commit 6cab5bb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mk/tests.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,23 @@ ifdef CHECK_IGNORED
3838
TESTARGS += --ignored
3939
endif
4040

41-
4241
# Arguments to the cfail/rfail/rpass/bench tests
4342
ifdef CFG_VALGRIND
4443
CTEST_RUNTOOL = --runtool "$(CFG_VALGRIND)"
4544
endif
4645

47-
ifdef PLEASE_BENCH
48-
TESTARGS += --bench
49-
endif
50-
5146
# Arguments to the perf tests
5247
ifdef CFG_PERF_TOOL
5348
CTEST_PERF_RUNTOOL = --runtool "$(CFG_PERF_TOOL)"
5449
endif
5550

5651
CTEST_TESTARGS := $(TESTARGS)
5752

53+
# --bench is only relevant for crate tests, not for the compile tests
54+
ifdef PLEASE_BENCH
55+
TESTARGS += --bench
56+
endif
57+
5858
ifdef VERBOSE
5959
CTEST_TESTARGS += --verbose
6060
endif

0 commit comments

Comments
 (0)