From ea5ce70199b90e7f5a6ed5052d34e5184f09da4e Mon Sep 17 00:00:00 2001 From: Steve Vaughan Date: Fri, 1 Mar 2024 16:17:37 -0500 Subject: [PATCH] test: Add golden files for test --- core/src/errors.rs | 1 - core/testdata/backtrace.txt | 22 ++++++++++++++++++++++ core/testdata/stacktrace.txt | 12 ++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 core/testdata/backtrace.txt create mode 100644 core/testdata/stacktrace.txt diff --git a/core/src/errors.rs b/core/src/errors.rs index 16ed7c312..e99af7aa6 100644 --- a/core/src/errors.rs +++ b/core/src/errors.rs @@ -651,7 +651,6 @@ mod tests { /// See [`object_panic_exception`] for a test which involves generating a panic and verifying /// that the resulting stack trace includes the offending call. #[test] - #[ignore] pub fn stacktrace_string() { // Setup: Start with a backtrace that includes all of the expected scenarios, including // cases where the file and location are not provided as part of the backtrace capture diff --git a/core/testdata/backtrace.txt b/core/testdata/backtrace.txt new file mode 100644 index 000000000..54ea9e83d --- /dev/null +++ b/core/testdata/backtrace.txt @@ -0,0 +1,22 @@ + 0: std::backtrace_rs::backtrace::libunwind::trace + at /rustc/ec08a0337f3556212525dbf1d3b41e19bdf27621/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 + 1: std::backtrace_rs::backtrace::trace_unsynchronized + at /rustc/ec08a0337f3556212525dbf1d3b41e19bdf27621/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 + 2: std::backtrace::Backtrace::create + at /rustc/ec08a0337f3556212525dbf1d3b41e19bdf27621/library/std/src/backtrace.rs:331:13 + 3: std::backtrace::Backtrace::capture + at /rustc/ec08a0337f3556212525dbf1d3b41e19bdf27621/library/std/src/backtrace.rs:297:9 + 4: comet::Java_org_apache_comet_NativeBase_init::{{closure}} + at /Users/somebody/src/arrow-datafusion-comet/core/src/lib.rs:70:77 + 5: std::panicking::try::do_call + at /rustc/ec08a0337f3556212525dbf1d3b41e19bdf27621/library/std/src/panicking.rs:526:40 + 6: ___rust_try + 7: std::panicking::try + at /rustc/ec08a0337f3556212525dbf1d3b41e19bdf27621/library/std/src/panicking.rs:490:19 + 8: std::panic::catch_unwind + at /rustc/ec08a0337f3556212525dbf1d3b41e19bdf27621/library/std/src/panic.rs:142:14 + 9: comet::errors::try_unwrap_or_throw + at /Users/somebody/src/arrow-datafusion-comet/core/src/errors.rs:369:43 + 10: Java_org_apache_comet_NativeBase_init + at /Users/somebody/src/arrow-datafusion-comet/core/src/lib.rs:53:5 + diff --git a/core/testdata/stacktrace.txt b/core/testdata/stacktrace.txt new file mode 100644 index 000000000..8b825fa2f --- /dev/null +++ b/core/testdata/stacktrace.txt @@ -0,0 +1,12 @@ +Some Error Message + at std::backtrace_rs::backtrace::libunwind::trace(/rustc/ec08a0337f3556212525dbf1d3b41e19bdf27621/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93) + at std::backtrace_rs::backtrace::trace_unsynchronized(/rustc/ec08a0337f3556212525dbf1d3b41e19bdf27621/library/std/src/../../backtrace/src/backtrace/mod.rs:66) + at std::backtrace::Backtrace::create(/rustc/ec08a0337f3556212525dbf1d3b41e19bdf27621/library/std/src/backtrace.rs:331) + at std::backtrace::Backtrace::capture(/rustc/ec08a0337f3556212525dbf1d3b41e19bdf27621/library/std/src/backtrace.rs:297) + at comet::Java_org_apache_comet_NativeBase_init::{{closure}}(/Users/somebody/src/arrow-datafusion-comet/core/src/lib.rs:70) + at std::panicking::try::do_call(/rustc/ec08a0337f3556212525dbf1d3b41e19bdf27621/library/std/src/panicking.rs:526) + at ___rust_try(__internal__:0) + at std::panicking::try(/rustc/ec08a0337f3556212525dbf1d3b41e19bdf27621/library/std/src/panicking.rs:490) + at std::panic::catch_unwind(/rustc/ec08a0337f3556212525dbf1d3b41e19bdf27621/library/std/src/panic.rs:142) + at comet::errors::try_unwrap_or_throw(/Users/somebody/src/arrow-datafusion-comet/core/src/errors.rs:369) + at Java_org_apache_comet_NativeBase_init(/Users/somebody/src/arrow-datafusion-comet/core/src/lib.rs:53)