From 1cf94f9dc2333b668520f1cb78a12664c3287413 Mon Sep 17 00:00:00 2001 From: ancient123 Date: Wed, 11 Jan 2023 09:21:07 -0700 Subject: [PATCH 1/2] Make scripts fail out on error --- scripts/run_benchmarks.sh | 6 +++++- scripts/run_tests.sh | 6 ++++-- scripts/test_coverage.sh | 4 ++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/run_benchmarks.sh b/scripts/run_benchmarks.sh index 274c6e4..1573705 100755 --- a/scripts/run_benchmarks.sh +++ b/scripts/run_benchmarks.sh @@ -1,4 +1,8 @@ -#!/bin/bash +#!/usr/bin/env bash + +#Fail out on error +set -e + cd .. cd hyperplonk # Run the benchmark binary diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index f654683..6bd4df2 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -1,10 +1,12 @@ #!/usr/bin/env bash +#Fail out on error +set -e + # We want the code to panic if there is an integer overflow export RUSTFLAGS="-C overflow-checks=on" -cargo test --release -p pcs --no-default-features --features=parallel -- -Zunstable-options --report-time -cargo test --release -- -Zunstable-options --report-time +cargo test --release --all -- -Zunstable-options --report-time cargo test --no-run --features=print-trace cargo test --no-run --no-default-features cargo bench --no-run \ No newline at end of file diff --git a/scripts/test_coverage.sh b/scripts/test_coverage.sh index 64be660..1d7891c 100755 --- a/scripts/test_coverage.sh +++ b/scripts/test_coverage.sh @@ -1,5 +1,9 @@ #!/usr/bin/env nix-shell #!nix-shell ../nix/nightly.nix -i bash + +#Fail out on error +set -e + set -o xtrace IGNORED_FILES="--ignore **/errors.rs\ --ignore **/src/bin/*\ From d9072ec0bf4f2df773f8e62fa47b2fdd0bcd73eb Mon Sep 17 00:00:00 2001 From: Alex Xiong Date: Thu, 12 Jan 2023 22:29:03 +0800 Subject: [PATCH 2/2] fix script --- scripts/run_tests.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index 6bd4df2..8a8b60f 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -8,5 +8,4 @@ export RUSTFLAGS="-C overflow-checks=on" cargo test --release --all -- -Zunstable-options --report-time cargo test --no-run --features=print-trace -cargo test --no-run --no-default-features -cargo bench --no-run \ No newline at end of file +cargo bench --no-run