Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NIGHTLY variable to CI script #467

Merged
merged 2 commits into from Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion contrib/test.sh
Expand Up @@ -17,6 +17,12 @@ fi
cargo --version
rustc --version

# Work out if we are using a nightly toolchain.
NIGHTLY=false
if cargo --version | grep nightly; then
NIGHTLY=true
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\]"

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

if [ "$DO_BENCH" = true ]; then # proxy for us having a nightly compiler
if [ "$NIGHTLY" = true ]; then
cargo test --all --all-features
RUSTFLAGS='--cfg=fuzzing' RUSTDOCFLAGS='--cfg=fuzzing' cargo test --all --all-features
fi
Expand Down
1 change: 1 addition & 0 deletions src/key.rs
Expand Up @@ -1651,6 +1651,7 @@ mod test {
use crate::Error::{InvalidPublicKey, InvalidSecretKey};
use crate::Scalar;

#[cfg(not(fuzzing))]
macro_rules! hex {
($hex:expr) => ({
let mut result = vec![0; $hex.len() / 2];
Expand Down