about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorMartin Nordholts <martin.nordholts@codetale.se>2025-09-13 11:24:51 +0200
committerMartin Nordholts <martin.nordholts@codetale.se>2025-09-13 12:06:55 +0200
commita48c8e337d1717ceeaa930a0a804374aa2e66419 (patch)
treeb0a62789efc8940f7958a34b2e511aeb283a11ad /compiler/rustc_middle/src
parent7ad23f43a225546c095123de52cc07d8719f8e2b (diff)
downloadrust-a48c8e337d1717ceeaa930a0a804374aa2e66419.tar.gz
rust-a48c8e337d1717ceeaa930a0a804374aa2e66419.zip
compiletest: Fix `--exact` test filtering
This fix only changes the behavior when using `--exact` test filtering,
which was quite broken. Before this fix, the following runs 0 tests:

    $ ./x test tests/run-make/crate-loading -- --exact
    running 0 tests
    test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 431 filtered out; finished in 24.95µs

With the fix the desired test is run:

    $ ./x test tests/run-make/crate-loading -- --exact
    running 1 tests
    test [run-make] tests/run-make/crate-loading ... ok

Without `--exact` the set of run tests is unchanged. This still runs
"too many" tests

    $ ./x test tests/run-make/crate-loading
    running 3 tests
    test [run-make] tests/run-make/crate-loading-crate-depends-on-itself ... ok
    test [run-make] tests/run-make/crate-loading-multiple-candidates ... ok
    test [run-make] tests/run-make/crate-loading ... ok

This still runs the one and only right test:

    $ ./x test tests/ui/lint/unused/unused-allocation.rs
    running 1 tests
    test [ui] tests/ui/lint/unused/unused-allocation.rs ... ok
Diffstat (limited to 'compiler/rustc_middle/src')
0 files changed, 0 insertions, 0 deletions