Merge rust-bitcoin/rust-secp256k1#432: Move panic test to top of script

d2e1f8cc95 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 d2e1f8cc95

Tree-SHA512: 90ad7a8762a6fd977345f347f0aa8b0979a7576585000b6d80624c0672b7de457dec471dc63b2e7fa4c3f52143d0f6fd1f4031a70f85c9fab4b7c22a787c438b
This commit is contained in:
Andrew Poelstra 2022-03-30 16:18:40 +00:00
commit 2ce67d9597
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 3 additions and 3 deletions

View File

@ -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"