Add --filter-mode=run-pass,compile-pass
to compiletest
#61719
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a
--filter-mode
option tocompiletest
and expose it through./x.py
.The
--filter-mode
flag will take a comma separated list of modes:compile-pass
compile-fail
run-pass
ui
run-fail
run-pass-valgrind
pretty
debuginfo-cdb
debuginfo-gdb+lldb
debuginfo-lldb
debuginfo-gdb
codegen
rustdoc
codegen-units
incremental
run-make
js-doc-test
mir-opt
assembly
When the mode is
ui
(e.g.src/test/ui
) then:// compile-pass
is interpreted as provided modecompile-pass
.// run-pass
is interpreted as provided moderun-pass
.compile-fail
.When
--filter-mode
is used, only tests fitting the modes included in the flag are retained. Other tests are ignored.As an example run, you can use
./x.py -i test --stage 1 --filter-mode run-pass
to execute all run-pass tests whether they are insrc/test/ui
or insidesrc/test/run-pass
.Another example is
./x.py -i test src/test/ui --stage 1 --filter-mode run-pass,compile-pass
which will cover both run-pass and compile-pass tests insrc/test/ui
specifically.This PR moves us towards a more systematic testing scheme in the spirit of #61712 and may enable moving
src/test/run-pass
altogether tosrc/test/ui
.r? @petrochenkov