-
Notifications
You must be signed in to change notification settings - Fork 13.8k
compiletest: Fix --exact
test filtering
#146501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Some changes occurred in src/tools/compiletest cc @jieyouxu |
rustbot has assigned @Mark-Simulacrum. Use |
2c8db37
to
733d8a2
Compare
This comment has been minimized.
This comment has been minimized.
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
733d8a2
to
a48c8e3
Compare
@bors r+ |
Rollup of 8 pull requests Successful merges: - #143314 (add reference id to test, and fix filename) - #146284 (Remove `div_rem` from `core::num::bignum`) - #146416 (Tidy dependency checks cleanups + QoL) - #146471 (bootstrap: Show target in "No such target exists" message) - #146478 (Improve `core::fmt` coverage) - #146480 (tests: update new test to accept new lifetime format) - #146488 (Improve `core::ptr` coverage) - #146501 (compiletest: Fix `--exact` test filtering) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #146501 - Enselic:x-test-filter, r=Mark-Simulacrum 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" (cc #134341) 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 ### Notes - I have not verified this on Windows which treats paths differently (but I see no reason why it should not work since my code should be platform agnostic).
This seems to have broken test filtering when not using > ./x test tests/ui --keep-stage 1 --test-args tests/ui --force-rerun
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 19788 filtered out; finished in 23.01µs |
Thanks for the ping. Looking into it right now. Expecting the fix to be easy. I'll keep you updated. |
Seems fixed by #146601. I'll do some more testing while PR CI runs. Edit: That PR seems ok according to my testing. |
…lacrum compiletest: Make `./x test --test-args ...` work again It accidentally broke with rust-lang#146501. The intention of that PR was to keep existing behavior if `--exact` is not used, but it had a bug. This PR fixes that bug.
compiletest: Make `./x test --test-args ...` work again It accidentally broke with rust-lang/rust#146501. The intention of that PR was to keep existing behavior if `--exact` is not used, but it had a bug. This PR fixes that bug.
This fix only changes the behavior when using
--exact
test filtering, whichwas quite broken. Before this fix, the following runs 0 tests:
With the fix the desired test is run:
Without
--exact
the set of run tests is unchanged. This still runs "too many" (cc #134341) testsThis still runs the one and only right test
Notes