Compiletest: Fix compare-output-by-lines directive#153797
Compiletest: Fix compare-output-by-lines directive#153797rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
Fixes: rust-lang#148235 This was checking that the blessed stderr was a subset of the stderr. Additionally, when re-blessing it would re-bless the subset that matched. So, when an extra line or comment was added and the line numbers changed, it would bless it without the line numbers.
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
|
@rustbot ready |
|
I think that reblessing-can-swap-order is not an ideal property, but don't want to block this PR on that. Thanks. |
|
Note they will only swap order if you re-bless when there is an actual change. If the diagnostics only change order (due to -Zthreads), they will match by lines and won't be re-blessed. |
…uwer Rollup of 7 pull requests Successful merges: - #153650 (Streamline active job collection.) - #153707 (Remove `CycleErrorHandling`.) - #153384 (Add missing safety doc for CString::from_vec_unchecked and async_drop_in_place) - #153752 (fix(delegation): Filter Out Module Segments in Generic Args Inheritance) - #153797 (Compiletest: Fix compare-output-by-lines directive) - #153810 (compiletest: Use PYTHONPATH for lldb too, not only gdb) - #153820 (Rename `opt_span_diag_lint` into `opt_span_lint` and remove `emit_diag_lint`)
It seems like a stable process would be:
Can we add that to the tooling (or comments, or documentation)? |
Add the option to run UI tests with the parallel frontend This PR adds two arguments for tests: 1. `--parallel-frontend-threads`: specify `-Zthread` to compile test case (currently UI tests only) 2. `--iteration-count`: the number of times to run each test Also, due to the non-deterministic diagnostic orders and cycle errors, this PR adds the directive `//@ ignore-parallel-frontend` to ignore tests with cycle error when the parallel-frontend is enabled (by `--parallel-frontend-threads`) and enables `//@ compare-output-by-lines` by default. Context: [#t-compiler/parallel-rustc > Add the parallel front-end test suite @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fparallel-rustc/topic/Add.20the.20parallel.20front-end.20test.20suite/near/578781369) This PR should work with rust-lang#153797 together.
Add the option to run UI tests with the parallel frontend This PR adds two arguments for tests: 1. `--parallel-frontend-threads`: specify `-Zthread` to compile test case (currently UI tests only) 2. `--iteration-count`: the number of times to run each test Also, due to the non-deterministic diagnostic orders and cycle errors, this PR adds the directive `//@ ignore-parallel-frontend` to ignore tests with cycle error when the parallel-frontend is enabled (by `--parallel-frontend-threads`) and enables `//@ compare-output-by-lines` by default. Context: [#t-compiler/parallel-rustc > Add the parallel front-end test suite @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fparallel-rustc/topic/Add.20the.20parallel.20front-end.20test.20suite/near/578781369) This PR should work with rust-lang#153797 together.
Add the option to run UI tests with the parallel frontend This PR adds two arguments for tests: 1. `--parallel-frontend-threads`: specify `-Zthread` to compile test case (currently UI tests only) 2. `--iteration-count`: the number of times to run each test Also, due to the non-deterministic diagnostic orders and cycle errors, this PR adds the directive `//@ ignore-parallel-frontend` to ignore tests with cycle error when the parallel-frontend is enabled (by `--parallel-frontend-threads`) and enables `//@ compare-output-by-lines` by default. Context: [#t-compiler/parallel-rustc > Add the parallel front-end test suite @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fparallel-rustc/topic/Add.20the.20parallel.20front-end.20test.20suite/near/578781369) This PR should work with rust-lang/rust#153797 together.
Add the option to run UI tests with the parallel frontend This PR adds two arguments for tests: 1. `--parallel-frontend-threads`: specify `-Zthread` to compile test case (currently UI tests only) 2. `--iteration-count`: the number of times to run each test Also, due to the non-deterministic diagnostic orders and cycle errors, this PR adds the directive `//@ ignore-parallel-frontend` to ignore tests with cycle error when the parallel-frontend is enabled (by `--parallel-frontend-threads`) and enables `//@ compare-output-by-lines` by default. Context: [#t-compiler/parallel-rustc > Add the parallel front-end test suite @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fparallel-rustc/topic/Add.20the.20parallel.20front-end.20test.20suite/near/578781369) This PR should work with rust-lang/rust#153797 together.
Fixes: #148235
This was checking that the blessed stderr was a subset of the stderr. Additionally, when re-blessing it would re-bless the subset that matched. So, when an extra line or comment was added and the line numbers changed, it would bless it without the line numbers.
I hope this is the intended behaviour now, my only concern is if the parallel frontend has cases where it sometimes emits less diagnostics than other times and so re-blessing the minimum was the intended behaviour? There used to be a flag called "compare-output-by-lines-subset" for this which used this logic.
r? @jieyouxu