@@ -20,56 +20,56 @@ if cargo --version | grep "1\.48"; then
2020fi
2121
2222# 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\]"
23+ cargo test --locked -- --ignored --exact ' tests::test_panic_raw_ctx_should_terminate_abnormally' 2>&1 | tee /dev/stderr | grep " SIGILL\\ |panicked at '\[libsecp256k1\]"
2424
2525# Make all cargo invocations verbose
2626export CARGO_TERM_VERBOSE=true
2727
2828# Defaults / sanity checks
29- cargo build --all
30- cargo test --all
29+ cargo build --locked -- all
30+ cargo test --locked -- all
3131
3232if [ " $DO_FEATURE_MATRIX " = true ]; then
33- cargo build --all --no-default-features
34- cargo test --all --no-default-features
33+ cargo build --locked -- all --no-default-features
34+ cargo test --locked -- all --no-default-features
3535
3636 # All features
37- cargo build --all --no-default-features --features=" $FEATURES "
38- cargo test --all --no-default-features --features=" $FEATURES "
37+ cargo build --locked -- all --no-default-features --features=" $FEATURES "
38+ cargo test --locked -- all --no-default-features --features=" $FEATURES "
3939 # Single features
4040 for feature in ${FEATURES}
4141 do
42- cargo build --all --no-default-features --features=" $feature "
43- cargo test --all --no-default-features --features=" $feature "
42+ cargo build --locked -- all --no-default-features --features=" $feature "
43+ cargo test --locked -- all --no-default-features --features=" $feature "
4444 done
4545 # Features tested with 'std' feature enabled.
4646 for feature in ${FEATURES}
4747 do
48- cargo build --all --no-default-features --features=" std,$feature "
49- cargo test --all --no-default-features --features=" std,$feature "
48+ cargo build --locked -- all --no-default-features --features=" std,$feature "
49+ cargo test --locked -- all --no-default-features --features=" std,$feature "
5050 done
5151 # Other combos
52- RUSTFLAGS=' --cfg=secp256k1_fuzz' RUSTDOCFLAGS=' --cfg=secp256k1_fuzz' cargo test --all
53- RUSTFLAGS=' --cfg=secp256k1_fuzz' RUSTDOCFLAGS=' --cfg=secp256k1_fuzz' cargo test --all --features=" $FEATURES "
54- cargo test --all --features=" rand serde"
52+ RUSTFLAGS=' --cfg=secp256k1_fuzz' RUSTDOCFLAGS=' --cfg=secp256k1_fuzz' cargo test --locked -- all
53+ RUSTFLAGS=' --cfg=secp256k1_fuzz' RUSTDOCFLAGS=' --cfg=secp256k1_fuzz' cargo test --locked -- all --features=" $FEATURES "
54+ cargo test --locked -- all --features=" rand serde"
5555
5656 if [ " $NIGHTLY " = true ]; then
57- cargo test --all --all-features
58- RUSTFLAGS=' --cfg=secp256k1_fuzz' RUSTDOCFLAGS=' --cfg=secp256k1_fuzz' cargo test --all --all-features
57+ cargo test --locked -- all --all-features
58+ RUSTFLAGS=' --cfg=secp256k1_fuzz' RUSTDOCFLAGS=' --cfg=secp256k1_fuzz' cargo test --locked -- all --all-features
5959 fi
6060
6161 # Examples
62- cargo run --example sign_verify --features=bitcoin-hashes-std
63- cargo run --example sign_verify_recovery --features=recovery,bitcoin-hashes-std
64- cargo run --example generate_keys --features=rand-std
62+ cargo run --locked -- example sign_verify --features=bitcoin-hashes-std
63+ cargo run --locked -- example sign_verify_recovery --features=recovery,bitcoin-hashes-std
64+ cargo run --locked -- example generate_keys --features=rand-std
6565fi
6666
6767if [ " $DO_LINT " = true ]
6868then
69- cargo clippy --all-features --all-targets -- -D warnings
70- cargo clippy --example sign_verify --features=bitcoin-hashes-std -- -D warnings
71- cargo clippy --example sign_verify_recovery --features=recovery,bitcoin-hashes-std -- -D warnings
72- cargo clippy --example generate_keys --features=rand-std -- -D warnings
69+ cargo clippy --locked -- all-features --all-targets -- -D warnings
70+ cargo clippy --locked -- example sign_verify --features=bitcoin-hashes-std -- -D warnings
71+ cargo clippy --locked -- example sign_verify_recovery --features=recovery,bitcoin-hashes-std -- -D warnings
72+ cargo clippy --locked -- example generate_keys --features=rand-std -- -D warnings
7373fi
7474
7575# Build the docs if told to (this only works with the nightly toolchain)
@@ -99,15 +99,15 @@ if [ "$DO_ASAN" = true ]; then
9999 CC=' clang -fsanitize=address -fno-omit-frame-pointer' \
100100 RUSTFLAGS=' -Zsanitizer=address -Clinker=clang -Cforce-frame-pointers=yes' \
101101 ASAN_OPTIONS=' detect_leaks=1 detect_invalid_pointer_pairs=1 detect_stack_use_after_return=1' \
102- cargo test --lib --all --features=" $FEATURES " -Zbuild-std --target x86_64-unknown-linux-gnu
102+ cargo test --locked -- lib --all --features=" $FEATURES " -Zbuild-std --target x86_64-unknown-linux-gnu
103103 cargo clean
104104 # The -Cllvm-args=-msan-eager-checks=0 flag was added to overcome this issue:
105105 # https://github.com/rust-bitcoin/rust-secp256k1/pull/573#issuecomment-1399465995
106106 CC=' clang -fsanitize=memory -fno-omit-frame-pointer' \
107107 RUSTFLAGS=' -Zsanitizer=memory -Zsanitizer-memory-track-origins -Cforce-frame-pointers=yes -Cllvm-args=-msan-eager-checks=0' \
108- cargo test --lib --all --features=" $FEATURES " -Zbuild-std --target x86_64-unknown-linux-gnu
109- cargo run --release --manifest-path=./no_std_test/Cargo.toml | grep -q " Verified Successfully"
110- cargo run --release --features=alloc --manifest-path=./no_std_test/Cargo.toml | grep -q " Verified alloc Successfully"
108+ cargo test --locked -- lib --all --features=" $FEATURES " -Zbuild-std --target x86_64-unknown-linux-gnu
109+ cargo run --locked -- release --manifest-path=./no_std_test/Cargo.toml | grep -q " Verified Successfully"
110+ cargo run --locked -- release --features=alloc --manifest-path=./no_std_test/Cargo.toml | grep -q " Verified alloc Successfully"
111111fi
112112
113113# Run formatter if told to.
0 commit comments