Skip to content

Commit 2ce67d9

Browse files
committed
Merge #432: Move panic test to top of script
d2e1f8c Move panic test to top of script (Tobin Harding) Pull request description: In `test.sh` we have a test that checks for a panic by greping the output of `cargo test --exact 'tests::test_panic_raw_ctx_should_terminate_abnormally'`. If we put this test at the top of the script right after we run `cargo test` we are guaranteed to not trigger a re-build. ### Note to reviewers I just noticed this patch somehow snuck into #420, all other changes in that PR are to `.github/workflows/rust.yml` so this change does not fit in there. Hence raising it as a separate PR. ACKs for top commit: apoelstra: ACK d2e1f8c Tree-SHA512: 90ad7a8762a6fd977345f347f0aa8b0979a7576585000b6d80624c0672b7de457dec471dc63b2e7fa4c3f52143d0f6fd1f4031a70f85c9fab4b7c22a787c438b
2 parents ae985dd + d2e1f8c commit 2ce67d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contrib/test.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ fi
1515
cargo --version
1616
rustc --version
1717

18+
# Test if panic in C code aborts the process (either with a real panic or with SIGILL)
19+
cargo test -- --ignored --exact 'tests::test_panic_raw_ctx_should_terminate_abnormally' 2>&1 | tee /dev/stderr | grep "SIGILL\\|panicked at '\[libsecp256k1\]"
20+
1821
# Make all cargo invocations verbose
1922
export CARGO_TERM_VERBOSE=true
2023

@@ -86,9 +89,6 @@ if [ "$DO_ASAN" = true ]; then
8689
cargo run --release --features=alloc --manifest-path=./no_std_test/Cargo.toml | grep -q "Verified alloc Successfully"
8790
fi
8891

89-
# Test if panic in C code aborts the process (either with a real panic or with SIGILL)
90-
cargo test -- --ignored --exact 'tests::test_panic_raw_ctx_should_terminate_abnormally' 2>&1 | tee /dev/stderr | grep "SIGILL\\|panicked at '\[libsecp256k1\]"
91-
9292
# Bench
9393
if [ "$DO_BENCH" = true ]; then
9494
cargo bench --all --features="unstable"

0 commit comments

Comments
 (0)