Skip to content

Commit 69349a8

Browse files
committed
Add NIGHTLY variable to CI script
We are currently using the DO_BENCH variable as a proxy for whether or not we are using a nightly toolchain, while this is technically correct we use it from within an if guarded statement that is guarded by DO_FEATURE_MATRIX and we never run the CI script with _both_ of these variables set to true. This means that the all features test is never being run. Add a NIGHTLY variable and set it based on the output of `cargo --version`.
1 parent 5f59820 commit 69349a8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

contrib/test.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ fi
1717
cargo --version
1818
rustc --version
1919

20+
# Work out if we are using a nightly toolchain.
21+
NIGHTLY=false
22+
if cargo --version | grep nightly; then
23+
NIGHTLY=true
24+
fi
25+
2026
# Test if panic in C code aborts the process (either with a real panic or with SIGILL)
2127
cargo test -- --ignored --exact 'tests::test_panic_raw_ctx_should_terminate_abnormally' 2>&1 | tee /dev/stderr | grep "SIGILL\\|panicked at '\[libsecp256k1\]"
2228

@@ -51,7 +57,7 @@ if [ "$DO_FEATURE_MATRIX" = true ]; then
5157
RUSTFLAGS='--cfg=fuzzing' RUSTDOCFLAGS=$RUSTFLAGS cargo test --all --features="$FEATURES"
5258
cargo test --all --features="rand serde"
5359

54-
if [ "$DO_BENCH" = true ]; then # proxy for us having a nightly compiler
60+
if [ "$NIGHTLY" = true ]; then
5561
cargo test --all --all-features
5662
RUSTFLAGS='--cfg=fuzzing' RUSTDOCFLAGS='--cfg=fuzzing' cargo test --all --all-features
5763
fi

0 commit comments

Comments
 (0)