-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Fix paths to coretests
and alloctests
#139123
base: master
Are you sure you want to change the base?
Conversation
Some changes occurred in compiler/rustc_codegen_gcc |
This comment has been minimized.
This comment has been minimized.
Looks like my changes to Since those particular tests which CI detected exercise the internals of collections, they currently have to be part of |
Following `rust-lang#135937` and `rust-lang#136642`, tests for core and alloc are in coretests and alloctests. Update paths referring to the old locations. Some context for changes which don't match that pattern: * library/std/src/thread/local/dynamic_tests.rs and library/std/src/sync/mpsc/sync_tests.rs were moved under library/std/tests/ in 332fb7e (Move std::thread_local unit tests to integration tests, 2025-01-17) and b8ae372 (Move std::sync unit tests to integration tests, 2025-01-17), respectively, so are no longer special cases. * There never was a library/core/tests/fmt.rs file. That comment previously referred to src/test/ui/ifmt.rs, which was folded into library/alloc/tests/fmt.rs in 949c966 (move format! interface tests, 2020-09-08).
2db2a3f
to
d5760fe
Compare
For cg_clif at least this is because the core tests don't run in CI here. In any case yesterday's sync PR fixed all references in cg_clif. |
@@ -677,7 +677,7 @@ fn test_projects(env: &Env, args: &TestArg) -> Result<(), String> { | |||
fn test_libcore(env: &Env, args: &TestArg) -> Result<(), String> { | |||
// FIXME: create a function "display_if_not_quiet" or something along the line. | |||
println!("[TEST] libcore"); | |||
let path = get_sysroot_dir().join("sysroot_src/library/core/tests"); | |||
let path = get_sysroot_dir().join("sysroot_src/library/coretests/tests"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let path = get_sysroot_dir().join("sysroot_src/library/coretests/tests"); | |
let path = get_sysroot_dir().join("sysroot_src/library/coretests"); |
and remove compiler/rustc_codegen_gcc/patches/0022-core-Disable-not-compiling-tests.patch
.
//! `#![no_core]` libraries cannot be tested directly due to duplicating lang | ||
//! items. All tests and benchmarks must be written externally in `core/{tests,benches}`. | ||
//! items. All tests and benchmarks must be written externally in | ||
//! `{coretests,alloctests}/{tests,benches}`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of referring to #![no_core]
libraries maybe instead refer to core and alloc? alloc is not #![no_core]
.
Following #135937 and #136642, tests for
core
andalloc
are incoretests
andalloctests
. Update paths referring to the old locations.Some context for changes which don't match that pattern:
library/std/src/thread/local/dynamic_tests.rs
andlibrary/std/src/sync/mpsc/sync_tests.rs
were moved underlibrary/std/tests/
in 332fb7e (Move std::thread_local unit tests to integration tests, 2025-01-17) and b8ae372 (Move std::sync unit tests to integration tests, 2025-01-17), respectively, so are no longer special cases.library/core/tests/fmt.rs
file. That comment previously referred tosrc/test/ui/ifmt.rs
, which was folded intolibrary/alloc/tests/fmt.rs
in 949c966 (move format! interface tests, 2020-09-08).Now, the only matches for
(alloc|core)/tests
are incompiler/rustc_codegen_{cranelift,gcc}/patches
. I don't know why CI hasn't broken because those patches can't apply. Or maybe they somehow still can apply?I don't know how to test the changes to
tidy
here.r? @bjorn3