-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Fix trailing newline in JUnit formatter #149437
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
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use |
|
emm, seems there is no unit tests for all the formatters (not the issue for this PR). |
|
There are some tests in tests/run-make/libtest-junit, can you update that to make sure this stays fixed? |
Expect the entire input to be a single XML document, instead of reading it line by line. This detects trailing junk better.
Copied validate_junit.py from libtest-junit. JUnit format works well in edition 2021, but is currently broken in edition 2024 by the mergeable doctest report.
Fix the panic in write_message() which expects messages to contain no embedded newlines. We still want a trailing newline at the end of the file though, so write it in different manner. Doctest runner no longer panics, but the output is kinda broken when `compile_fail` doctests are present. This is because they are not mergeable.
|
Added some tests to show how it works in edition 2021, fails in edition 2024, and how it's fixed by this PR. However, while doing that I found a case that breaks JUnit output in edition 2024. Mergeable doctests will need a bit more work to fix that (should I file a separate issue for this?), but otherwise @rustbot ready |
|
Feel free to cut a separate issue. @bors r+ |
Fix trailing newline in JUnit formatter `write_message()` expects messages to contain no newlines. Fixes rust-lang#149436
Fix trailing newline in JUnit formatter `write_message()` expects messages to contain no newlines. Fixes rust-lang#149436
Rollup of 8 pull requests Successful merges: - #148755 (Constify `DropGuard::dismiss` and trait impls) - #148825 (Add SystemTime::{MIN, MAX}) - #149272 (Fix vec iter zst alignment) - #149417 (tidy: Detect outdated workspaces in workspace list) - #149437 (Fix trailing newline in JUnit formatter) - #149773 (fix va_list test by adding a llvmir signext check) - #149894 (Update to mdbook 0.5) - #149955 (Fix typo in armv7a-vex-v5 documentation) r? `@ghost` `@rustbot` modify labels: rollup
|
Failed in #149975 (comment) @bors r- |
|
Whoops. I should have caught onto that when my I'll go add |
stage1's rustdoc is using stage0's libtest which does not have a fix from 069cf9d, making the test run fail. Ensure that this test is executed with everything recompiled in stage2.
|
@rustbot ready for another run |
|
@bors r+ rollup=iffy |
Fix trailing newline in JUnit formatter `write_message()` expects messages to contain no newlines. Fixes rust-lang#149436
Rollup of 7 pull requests Successful merges: - #147552 ([Debugger Visualizers] Optimize lookup behavior) - #149437 (Fix trailing newline in JUnit formatter) - #149812 (Add const default for OnceCell and OnceLock) - #150035 (fix docustring on fetch_or) - #150160 (Fix ICE (#149980) for invalid EII in statement position) - #150191 (change non-canonical clone impl to {*self}, fix some doc comments) - #150203 (Drop the From derive macro from the v1 prelude) r? `@ghost` `@rustbot` modify labels: rollup
Fix trailing newline in JUnit formatter `write_message()` expects messages to contain no newlines. Fixes rust-lang#149436
Rollup of 6 pull requests Successful merges: - #149437 (Fix trailing newline in JUnit formatter) - #149812 (Add const default for OnceCell and OnceLock) - #150035 (fix docustring on fetch_or) - #150160 (Fix ICE (#149980) for invalid EII in statement position) - #150191 (change non-canonical clone impl to {*self}, fix some doc comments) - #150203 (Drop the From derive macro from the v1 prelude) r? `@ghost` `@rustbot` modify labels: rollup
Fix trailing newline in JUnit formatter `write_message()` expects messages to contain no newlines. Fixes rust-lang#149436
Rollup of 13 pull requests Successful merges: - #146377 (Don't strip shebang in expr-ctxt `include!(…)`) - #149437 (Fix trailing newline in JUnit formatter) - #149658 (tests/assembly-llvm/some-non-zero-from-atomic-optimization.rs: New test) - #149812 (Add const default for OnceCell and OnceLock) - #149882 (miri: add -Zbinary-dep-depinfo to dependency builds) - #150009 (Enable llvm-libunwind by default for Hexagon targets) - #150035 (fix docustring on fetch_or) - #150082 (tests/ui/traits/fmt-pointer-trait.rs: Add HRTB fn pointer case) - #150160 (Fix ICE (#149980) for invalid EII in statement position) - #150184 (mir_build: Use the same length type for `TestableCase::Slice` and `TestKind::Len`) - #150191 (change non-canonical clone impl to {*self}, fix some doc comments) - #150203 (Drop the From derive macro from the v1 prelude) - #150208 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
|
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing d0e6d77 (parent) -> d3f16d2 (this PR) Test differencesShow 4 test diffsStage 1
Stage 2
Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard d3f16d2f35d8d4b25bb15a85ae869eee70ffb4cd --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (d3f16d2): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary 0.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 481.858s -> 481.777s (-0.02%) |
write_message()expects messages to contain no newlines.Fixes #149436