From fe5bcf759e607f6685ad0822fb877864b000d2a1 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Wed, 8 Jul 2020 22:57:36 +0200 Subject: [PATCH] Run proof script only on existing files. --- scripts/run_proofs.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/scripts/run_proofs.sh b/scripts/run_proofs.sh index bc6cd8e8a..db6b0e02b 100755 --- a/scripts/run_proofs.sh +++ b/scripts/run_proofs.sh @@ -10,16 +10,18 @@ git fetch origin error=0 for new_proof in $(git diff origin/develop --name-only test/formal/) do - set +e - echo "Proving $new_proof..." - output=$(python3 "$new_proof") - result=$? - set -e + if [ -e "$new_proof" ]; then + set +e + echo "Proving $new_proof..." + output=$(python3 "$new_proof") + result=$? + set -e - if [[ "$result" != 0 ]] - then - echo "Proof $(basename "$new_proof" ".py") failed: $output." - error=1 + if [[ "$result" != 0 ]] + then + echo "Proof $(basename "$new_proof" ".py") failed: $output." + error=1 + fi fi done