2025-04-11 Dealing with disabled tests
Meeting proposal: https://github.com/rust-lang/compiler-team/issues/540
We sometimes disable tests because some other component we don't control (e.g. LLVM) is causing them to fail, for example:
rustc
test disabled under ./testscompiler-builtins
under ./testcrate
:
Comment from @lqd:
Is the following in scope for that meeting: is it possible to ensure these optional components' tests are indeed executed on CI ? (Or is that more of a t-infra concern). I'm thinking of the needs-lld tests in particular, that we currently can run locally but not on CI.
compiler-builtins
… maybe Trevor? I think compiler-builtins
has its own CI test suites as well…
Reporting test suite statistics post-merge:
(jieyouxu: Feel free to rearrange/reword the following)
(apiraino: All the following could be imo great stuff to improve our docs about tests on the rustc-dev-guide)
Notes on test diversity:
rust-lang/rust
and rust-lang/$crate
. Many rust-lang/$crate
have their own test suites that get exercised in per-repo CI.rust-lang/rust
, we run test suites of:
tests/
cargotest
(tiny-crater
-like thing that is a smoke test of a few selected crates), not to be confused with cargo
miri
, rust-analyzer
, clippy
, rustfmt
, cargo
, …)coretests
, alloctests
, library doctests)error-index
Notes for compiletest-managed test suites under tests/
:
//@ ignore-test
that are not support files.
//@ known-bug: #123456
is used instead of //@ ignore-test
if test is broken and thus disabled with a proper issue to track it, instead of //@ ignore-test
which is sometimes used to ignore non-test/supporting files.
//@ known-debug
actually does in compiletest, I think it has slightly different meaning in crashes tests vs non-crashes tests.//@ ignore-$target
s.
//@ needs-crate-type: dylib
.//@ ignore-wasm (needs dylib)
.//@ ignore-xxx
: //@ ignore-windows
when actually //@ ignore-windows-gnu
is sufficient.//@ only-xxx
directives (but only if coverage against multiple targets or whatever is actually meaningful regarding test intention).//@ ignore-test
and which tests are ignored for //@ only-$target
).//@ needs-windows
and //@ ignore-windows
) that can lead to tests that are never run.remote-test-{server,client}
scheme to allow running test binaries on the cross-compiled target that have more complicated configurations (in qemu/emulators and whatever), so that we don't need as many //@ ignore-cross-compile
.run-make
tests and found several that were never run in our set of CI jobs.//@ edition
tagging, will be fixed in rust#139578