Skip to content

Commit

Permalink
fix: color-eyre theme test suite backtraces to match the tested MSRV
Browse files Browse the repository at this point in the history
  • Loading branch information
ten3roberts committed Jan 23, 2024
1 parent 1da23d9 commit eb26e02
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 48 deletions.
68 changes: 32 additions & 36 deletions color-eyre/tests/data/theme_error_control_minimal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,41 @@ Error:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ⋮ 5 frames hidden ⋮ 
6: theme::get_error::create_report::h89d883b51d51a08b
at /home/jlusby/git/yaahc/color-eyre/tests/theme.rs:17
7: theme::get_error::{{closure}}::hb62079fda66513a2
at /home/jlusby/git/yaahc/color-eyre/tests/theme.rs:25
8: core::option::Option<T>::ok_or_else::h3227505b8a14ed22
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/option.rs:954
9: theme::get_error::hd930d722dbdb6279
at /home/jlusby/git/yaahc/color-eyre/tests/theme.rs:25
10: theme::test_error_backwards_compatibility::h920cc312bf19dc01
at /home/jlusby/git/yaahc/color-eyre/tests/theme.rs:43
11: theme::test_error_backwards_compatibility::{{closure}}::h0c00291bcfdb63ce
at /home/jlusby/git/yaahc/color-eyre/tests/theme.rs:41
12: core::ops::function::FnOnce::call_once::h7736c3dcb6fd829d
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs:227
13: core::ops::function::FnOnce::call_once::h83cc023b85256d97
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs:227
14: test::__rust_begin_short_backtrace::h7330e4e8b0549e26
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/test/src/lib.rs:585
15: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6b77566b8f386abb
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/boxed.rs:1691
16: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h2ad5de64df41b71c
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panic/unwind_safe.rs:271
17: std::panicking::try::do_call::he67b1e56b423a618
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:403
18: std::panicking::try::ha9224adcdd41a723
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:367
19: std::panic::catch_unwind::h9111b58ae0b27828
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs:133
20: test::run_test_in_process::h15b6b7d5919893aa
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/test/src/lib.rs:608
21: test::run_test::{{closure}}::h8ef02d13d4506b7f
at /rustc/7b4d9e155fec06583c763f176fc432dc779f1fc6/library/test/src/lib.rs:572
22: test::run_test::{{closure}}::hcd7b423365d0ff7e
at /rustc/7b4d9e155fec06583c763f176fc432dc779f1fc6/library/test/src/lib.rs:600
 ⋮ 13 frames hidden ⋮ 
6: theme::get_error::create_report::h43540daddae98383
at /home/freja/dev/rust/eyre/color-eyre/tests/theme.rs:17
7: theme::get_error::{{closure}}::h40bbef2f4cd93fab
at /home/freja/dev/rust/eyre/color-eyre/tests/theme.rs:26
8: core::option::Option<T>::ok_or_else::h8aa47839ff49cfbe
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/option.rs:1087
9: theme::get_error::h78b5b4d52bfbbad0
at /home/freja/dev/rust/eyre/color-eyre/tests/theme.rs:26
10: theme::test_error_backwards_compatibility::h9de398ce80defffa
at /home/freja/dev/rust/eyre/color-eyre/tests/theme.rs:45
11: theme::test_error_backwards_compatibility::{{closure}}::hbe7b8ad2562c4dc4
at /home/freja/dev/rust/eyre/color-eyre/tests/theme.rs:43
12: core::ops::function::FnOnce::call_once::hfc715417a1b707c5
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248
13: core::ops::function::FnOnce::call_once::h9ee1367930602049
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248
14: test::__rust_begin_short_backtrace::h35061c5e0f5ad5d6
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/test/src/lib.rs:572
15: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h98fe3dd14bfe63ea
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/alloc/src/boxed.rs:1940
16: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h3ab012fb764e8d57
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panic/unwind_safe.rs:271
17: std::panicking::try::do_call::h810a5ea64fd04126
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:492
18: std::panicking::try::h0b213f9a8c1fe629
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:456
19: std::panic::catch_unwind::h00f746771ade371f
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:137
20: test::run_test_in_process::h5645647f0d0a3da3
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/test/src/lib.rs:595
 ⋮ 15 frames hidden ⋮ 

Note: note
Warning: warning
Suggestion: suggestion

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
Run with RUST_BACKTRACE=full to include source snippets.
22 changes: 10 additions & 12 deletions color-eyre/tests/data/theme_panic_control_no_spantrace.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
Finished dev [unoptimized + debuginfo] target(s) in 0.03s
warning: the following packages contain code that will be rejected by a future version of Rust: nom v4.2.3
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
Running `target/debug/examples/theme_test_helper`
Finished dev [unoptimized + debuginfo] target(s) in 0.07s
Running `/home/freja/dev/rust/eyre/target/debug/examples/theme_test_helper`
The application panicked (crashed).
Message: <non string panic payload>
Location: examples/theme_test_helper.rs:37
Location: color-eyre/examples/theme_test_helper.rs:38

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ⋮ 7 frames hidden ⋮ 
8: std::panic::panic_any::h696507828cece708
at /rustc/7b4d9e155fec06583c763f176fc432dc779f1fc6/library/std/src/panic.rs:63
9: theme_test_helper::main::h8b0946db6f62a6fa
at /home/tei/dev/rust/color-eyre/examples/theme_test_helper.rs:37
10: core::ops::function::FnOnce::call_once::h6e047342a35216be
at /rustc/7b4d9e155fec06583c763f176fc432dc779f1fc6/library/core/src/ops/function.rs:250
 ⋮ 6 frames hidden ⋮ 
7: std::panic::panic_any::h4a05c03c4d0c389c
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:61
8: theme_test_helper::main::hfc653b28cad3659d
at /home/freja/dev/rust/eyre/color-eyre/examples/theme_test_helper.rs:38
9: core::ops::function::FnOnce::call_once::hb0110cdf4417a5ed
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248
 ⋮ 16 frames hidden ⋮ 

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Expand Down

0 comments on commit eb26e02

Please sign in to comment.