Repository navigation
core: Use autotests to split up coretests - #166487
Conversation
|
r? @clarfonthey rustbot has assigned @clarfonthey. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
98fe44c to
7119538
Compare
This comment has been minimized.
This comment has been minimized.
7119538 to
2a97783
Compare
|
cc @bjorn3 |
This comment has been minimized.
This comment has been minimized.
2a97783 to
f7f5f05
Compare
|
Note it might be nice to do this for alloctests as well. |
|
Huh, I didn't realize alloctests was also in rough shape, about 14 seconds for me. I wonder if we got hit by a compiler regression at some point or if it's been like this for a while. |
|
Well, if coretests is bad, alloctests is also bad, since a lot of alloc tests are just core tests deferred so we can use vec and string. |
|
Hm, but |
|
Yeah, but if we access Whereas at least in |
|
I'm not sure I follow, aren't tests only ever built against a single core+alloc+std version? Even |
This comment has been minimized.
This comment has been minimized.
|
Realising now how easy this is to create merge conflicts, I figure you may end up wanting to take this week off, but whenever you're next ready to get to this we can arrange to ensure that we rebase and high-priority merge this. Feel free to ping me when you want do that. (I don't mind being bothered whenever.) |
|
I'm ready whenever, but also in no hurry so feel free to take your time looking through. I wasn't planning on rebasing until approved anyway. |
|
To be clear, I have skimmed it and it looks very reasonable to me, assuming it runs as expected. I'm fine calling that r=me and letting you add in whatever rebasing/extras you want. When approving, do: bors r=clarfonthey p=1 rollup=iffy note="Highly prone to merge conflicts, modifies several library tests" |
Prepare for splitting tests. Done in a separate commit so git has an easier time tracking these.
f7f5f05 to
003d452
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Yeah it's pretty mechanical, mostly feature moving. Thanks for taking a look. @bors r=clarfonthey p=1 rollup=iffy note="Highly prone to merge conflicts, modifies several library tests" |
This comment has been minimized.
This comment has been minimized.
This crate currently takes a rather long time to build, 40s-1m, which makes iteration difficult. Switch to the same pattern as std using Cargo's test detection so this automatically gets split into more crates. The change cuts off about 50% of the cold build time on my machine, and avoids needing to rebuild everything when a single test file is changed (incremental unfortunately does not work great). `num` is the limiting test, as it alone takes about 20s to build, but that could possibly be split further in the future. This change also caught that error.rs was not being run because it wasn't listed as a test module. `deny(unsafe_op_in_unsafe_fn)` is also removed as that is now implied by the edition. Zulip discussion: https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Library.20tests.20build.20time/with/643081197
003d452 to
ff043ee
Compare
|
This pull request was unapproved. |
|
Can't sort apparently @bors r=clarfonthey |
|
The note gets removed on new r+, so, you have to add it every time. @bors r=clarfonthey p=1 rollup=iffy note="Highly prone to merge conflicts, modifies several library tests" |
|
Wait, maybe not. Whatever, the priority should make it clear. |
I fixed this recently :3 |
…uwer Rollup of 9 pull requests Successful merges: - #166487 (core: Use autotests to split up coretests) - #165145 (Various incr comp session refactors) - #165337 (Windows: Don't make RwLock writers race readers) - #165732 (feat: rename region obligations) - #166061 (Offload: generic kernels in a lib) - #166539 (Restore the section in `global-target-feature.rs`) - #165721 (avoid Terminator:None in coroutine drop shim building) - #166453 (perf: remove cache in `FoldEscapingRegions`) - #166547 (Pin i686 msvc)
Rollup merge of #166487 - tgross35:split-coretests, r=clarfonthey core: Use autotests to split up coretests This crate currently takes a rather long time to build, 40s-1m, which makes iteration difficult. Switch to the same pattern as std using Cargo's test detection so this automatically gets split into more crates. The change cuts off about 50% of the cold build time on my machine, and avoids needing to rebuild everything when a single test file is changed (incremental unfortunately does not work great). `num` is the limiting test, as it alone takes about 20s to build, but that could possibly be split further in the future. This change also caught that error.rs was not being run because it wasn't listed as a test module. `deny(unsafe_op_in_unsafe_fn)` is also removed as that is now implied by the edition. Zulip discussion: https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Library.20tests.20build.20time/with/643081197
View all comments
This crate currently takes a rather long time to build, 40s-1m, which makes iteration difficult. Switch to the same pattern as std using Cargo's test detection so this automatically gets split into more crates.
The change cuts off about 50% of the cold build time on my machine, and avoids needing to rebuild everything when a single test file is changed (incremental unfortunately does not work great).
numis the limiting test, as it alone takes about 20s to build, but that could possibly be split further in the future.This change also caught that error.rs was not being run because it wasn't listed as a test module.
deny(unsafe_op_in_unsafe_fn)is also removed as that is now implied by the edition.Zulip discussion: https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Library.20tests.20build.20time/with/643081197