|
1 | | -#!/bin/sh |
| 1 | +#!/usr/bin/env bash |
2 | 2 |
|
3 | 3 | set -ex |
4 | 4 |
|
| 5 | +REPO_DIR=$(git rev-parse --show-toplevel) |
5 | 6 | FEATURES="bitcoin-hashes global-context lowmemory rand recovery serde std alloc bitcoin-hashes-std rand-std" |
6 | 7 |
|
7 | 8 | cargo --version |
|
16 | 17 | # Pin dependencies as required if we are using MSRV toolchain. |
17 | 18 | if cargo --version | grep "1\.48"; then |
18 | 19 | cargo update -p wasm-bindgen-test --precise 0.3.34 |
19 | | - cargo update -p serde --precise 1.0.156 |
| 20 | + cargo update -p serde_test --precise 1.0.175 |
20 | 21 | fi |
21 | 22 |
|
22 | 23 | # Test if panic in C code aborts the process (either with a real panic or with SIGILL) |
23 | | -cargo test -- --ignored --exact 'tests::test_panic_raw_ctx_should_terminate_abnormally' 2>&1 | tee /dev/stderr | grep "SIGILL\\|panicked at '\[libsecp256k1\]" |
| 24 | +cargo test -- --ignored --exact 'tests::test_panic_raw_ctx_should_terminate_abnormally' 2>&1 \ |
| 25 | + | tee /dev/stderr \ |
| 26 | + | grep "SIGILL\\|\[libsecp256k1] illegal argument. !rustsecp256k1_v0_._._fe_is_zero(&ge->x)" |
24 | 27 |
|
25 | 28 | # Make all cargo invocations verbose |
26 | 29 | export CARGO_TERM_VERBOSE=true |
@@ -106,6 +109,12 @@ if [ "$DO_ASAN" = true ]; then |
106 | 109 | CC='clang -fsanitize=memory -fno-omit-frame-pointer' \ |
107 | 110 | RUSTFLAGS='-Zsanitizer=memory -Zsanitizer-memory-track-origins -Cforce-frame-pointers=yes -Cllvm-args=-msan-eager-checks=0' \ |
108 | 111 | cargo test --lib --all --features="$FEATURES" -Zbuild-std --target x86_64-unknown-linux-gnu |
| 112 | + |
| 113 | + pushd "$REPO_DIR/no_std_test" > /dev/null || exit 1 |
| 114 | + # See https://github.com/rust-bitcoin/rust-secp256k1/pull/641#issuecomment-1671598914 |
| 115 | + cargo update -p cc --precise 1.0.79 |
| 116 | + popd > /dev/null || exit 1 |
| 117 | + |
109 | 118 | cargo run --release --manifest-path=./no_std_test/Cargo.toml | grep -q "Verified Successfully" |
110 | 119 | cargo run --release --features=alloc --manifest-path=./no_std_test/Cargo.toml | grep -q "Verified alloc Successfully" |
111 | 120 | fi |
|
0 commit comments