Run proof script only on existing files.

This commit is contained in:
Daniel Kirchner 2020-07-08 22:57:36 +02:00
parent f3e100a000
commit fe5bcf759e

View File

@ -10,16 +10,18 @@ git fetch origin
error=0 error=0
for new_proof in $(git diff origin/develop --name-only test/formal/) for new_proof in $(git diff origin/develop --name-only test/formal/)
do do
set +e if [ -e "$new_proof" ]; then
echo "Proving $new_proof..." set +e
output=$(python3 "$new_proof") echo "Proving $new_proof..."
result=$? output=$(python3 "$new_proof")
set -e result=$?
set -e
if [[ "$result" != 0 ]] if [[ "$result" != 0 ]]
then then
echo "Proof $(basename "$new_proof" ".py") failed: $output." echo "Proof $(basename "$new_proof" ".py") failed: $output."
error=1 error=1
fi
fi fi
done done