-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
compiletest: Store test collection context/state in two structs #131870
Conversation
The new name makes it clearer that this is a timestamp, and is collected from input files considered common to all tests.
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
Some changes occurred in src/tools/compiletest cc @jieyouxu |
r? jieyouxu |
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.
Thanks, this looks like a nice logical grouping. One minor nit, then r=me after PR CI is green.
struct TestCollector { | ||
tests: Vec<test::TestDescAndFn>, | ||
found_path_stems: HashSet<PathBuf>, | ||
poisoned: bool, |
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.
Remark: I want to delete this poison thing and eventually just store a vec of errors/diagnostics, but anyway. Possibly still account for --fail-fast
, but yeah.
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.
Yeah, I had an earlier draft where I tried to get rid of poisoned
entirely, but in the end I decided to make this PR mostly faithful to the existing behaviour.
At some point in the future, having a list of errors instead of a boolean flag would be great.
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.
Cool
@bors r+ rollup |
compiletest: Store test collection context/state in two structs This is another incremental cleanup that untangles some of the parameter passing during test collection, making it easier to see which pieces of context information are read-only, and making it easier to find where each field is used.
compiletest: Store test collection context/state in two structs This is another incremental cleanup that untangles some of the parameter passing during test collection, making it easier to see which pieces of context information are read-only, and making it easier to find where each field is used.
src/tools/compiletest/src/lib.rs
Outdated
fn check_overlapping_tests(found_paths: &HashSet<PathBuf>) { | ||
fn check_for_overlapping_test_paths(found_path_stems: &BTreeSet<PathBuf>) { |
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.
There is actually perf difference, 0710ebb
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.
Ahh, that was linked before #131870 (comment)
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.
The PR description said "Wall time didn't improved :-) ."
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.
Lol, I'm going to rerun some benchmarks locally
@bors r- |
@Zalathar let's stick with |
cc5fd6a
to
5540976
Compare
BTreeSet change removed; back to the original HashSet. |
Thanks. @bors r+ rollup |
Rollup of 3 pull requests Successful merges: - rust-lang#126207 (std::unix::stack_overflow::drop_handler addressing todo through libc …) - rust-lang#131864 (Never emit `vptr` for empty/auto traits) - rust-lang#131870 (compiletest: Store test collection context/state in two structs) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#131870 - Zalathar:test-collector, r=jieyouxu compiletest: Store test collection context/state in two structs This is another incremental cleanup that untangles some of the parameter passing during test collection, making it easier to see which pieces of context information are read-only, and making it easier to find where each field is used.
This is another incremental cleanup that untangles some of the parameter passing during test collection, making it easier to see which pieces of context information are read-only, and making it easier to find where each field is used.