From d2e1f8cc95b90579978585ea7d370dda594bcc7c Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Sat, 19 Mar 2022 10:52:14 +1100 Subject: [PATCH] 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. --- contrib/test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/test.sh b/contrib/test.sh index a892a78..95d9afc 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -15,6 +15,9 @@ fi cargo --version rustc --version +# Test if panic in C code aborts the process (either with a real panic or with SIGILL) +cargo test -- --ignored --exact 'tests::test_panic_raw_ctx_should_terminate_abnormally' 2>&1 | tee /dev/stderr | grep "SIGILL\\|panicked at '\[libsecp256k1\]" + # Make all cargo invocations verbose export CARGO_TERM_VERBOSE=true @@ -86,9 +89,6 @@ if [ "$DO_ASAN" = true ]; then cargo run --release --features=alloc --manifest-path=./no_std_test/Cargo.toml | grep -q "Verified alloc Successfully" fi -# Test if panic in C code aborts the process (either with a real panic or with SIGILL) -cargo test -- --ignored --exact 'tests::test_panic_raw_ctx_should_terminate_abnormally' 2>&1 | tee /dev/stderr | grep "SIGILL\\|panicked at '\[libsecp256k1\]" - # Bench if [ "$DO_BENCH" = true ]; then cargo bench --all --features="unstable"