compiletest: Capture panic messages via a custom panic hook by Zalathar · Pull Request #146068 · rust-lang/rust (original) (raw)

Output diff for RUST_BACKTRACE=1

--- _before.txt 2025-09-01 12:28:53 +++ _after.txt 2025-09-01 12:29:05 @@ -1,40 +1,40 @@ Building stage1 compiler artifacts (stage0 -> stage1, aarch64-apple-darwin) Creating a sysroot for stage1 compiler (use rustup toolchain link 'name' build/host/stage1) Building stage1 library artifacts (stage1 -> stage1, aarch64-apple-darwin) Building stage1 compiletest (stage0 -> stage1, aarch64-apple-darwin) Building stage1 coverage-dump (stage0 -> stage1, aarch64-apple-darwin) Testing stage2 compiletest suite=coverage mode=coverage-map (stage1 -> stage2, aarch64-apple-darwin)

running 1 tests

[coverage-map] tests/coverage/trivial.rs ... F

failures:

---- [coverage-map] tests/coverage/trivial.rs stdout ----

thread '[coverage-map] tests/coverage/trivial.rs' panicked at src/tools/compiletest/src/runtest/coverage.rs:22:19: @@ MY PANIC MESSAGE @@ stack backtrace:

note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace. ---- [coverage-map] tests/coverage/trivial.rs stdout end ----

failures: [coverage-map] tests/coverage/trivial.rs

-test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 94 filtered out; finished in 19.16ms +test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 94 filtered out; finished in 10.93ms

Some tests failed in compiletest suite=coverage mode=coverage-map host=aarch64-apple-darwin target=aarch64-apple-darwin

Output diff (ignoring space change) for RUST_BACKTRACE=full

--- _before.txt 2025-09-01 12:31:37 +++ _after.txt 2025-09-01 12:31:23 @@ -1,104 +1,94 @@ Building stage1 compiler artifacts (stage0 -> stage1, aarch64-apple-darwin) Creating a sysroot for stage1 compiler (use rustup toolchain link 'name' build/host/stage1) Building stage1 library artifacts (stage1 -> stage1, aarch64-apple-darwin) Building stage1 compiletest (stage0 -> stage1, aarch64-apple-darwin) Building stage1 coverage-dump (stage0 -> stage1, aarch64-apple-darwin) Testing stage2 compiletest suite=coverage mode=coverage-map (stage1 -> stage2, aarch64-apple-darwin)

running 1 tests

[coverage-map] tests/coverage/trivial.rs ... F

failures:

---- [coverage-map] tests/coverage/trivial.rs stdout ----

thread '[coverage-map] tests/coverage/trivial.rs' panicked at src/tools/compiletest/src/runtest/coverage.rs:22:19: @@ MY PANIC MESSAGE @@ stack backtrace:

failures: [coverage-map] tests/coverage/trivial.rs

-test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 94 filtered out; finished in 13.06ms +test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 94 filtered out; finished in 25.01ms

Some tests failed in compiletest suite=coverage mode=coverage-map host=aarch64-apple-darwin target=aarch64-apple-darwin