Skip to content

Commit d2e1f8c

Browse files
committed
Move panic test to top of script
The test that checks for a panic uses `cargo test --exact`, it makes sense to put it at the top of the script right after we run `cargo test` so we can run the test without triggering a re-build.
1 parent ae985dd commit d2e1f8c

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)