2019-06-19 17:25:05 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2019-06-20 11:49:24 +00:00
|
|
|
(
|
2019-06-19 17:25:05 +00:00
|
|
|
REPO_ROOT="$(dirname "$0")"/..
|
2019-06-20 11:49:24 +00:00
|
|
|
cd "$REPO_ROOT"
|
2019-06-19 17:25:05 +00:00
|
|
|
|
|
|
|
git fetch origin
|
|
|
|
error=0
|
2019-06-20 11:49:24 +00:00
|
|
|
for new_proof in $(git diff origin/develop --name-only test/formal/)
|
2019-06-19 17:25:05 +00:00
|
|
|
do
|
2020-07-08 20:57:36 +00:00
|
|
|
if [ -e "$new_proof" ]; then
|
|
|
|
set +e
|
|
|
|
echo "Proving $new_proof..."
|
|
|
|
output=$(python3 "$new_proof")
|
|
|
|
result=$?
|
|
|
|
set -e
|
2019-06-19 17:25:05 +00:00
|
|
|
|
2020-07-08 20:57:36 +00:00
|
|
|
if [[ "$result" != 0 ]]
|
|
|
|
then
|
|
|
|
echo "Proof $(basename "$new_proof" ".py") failed: $output."
|
|
|
|
error=1
|
|
|
|
fi
|
2019-06-19 17:25:05 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [[ "error" -eq 0 ]]
|
|
|
|
then
|
|
|
|
echo "All proofs succeeded."
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit $error
|
2019-06-20 11:49:24 +00:00
|
|
|
)
|