adds exit code and error printing

This commit is contained in:
damirka 2021-08-18 14:53:18 +03:00
parent a511638021
commit bc6ad13930

View File

@ -39,15 +39,22 @@ jobs:
# Using the prepared ASTs and the pulled and unzipped tgc run theorem generation.
- name: Run tgc over the asts
run: |
ARRAY=();
errors=();
for dir in `ls tmp/tgc`;
do
cd tmp/tgc/$dir; # enter the directory
./../../../acl2/tgc canonicalization initial_ast.json canonicalization_ast.json canonicalization-theorem.lisp || ARRAY+=("$dir");
./../../../acl2/tgc canonicalization initial_ast.json canonicalization_ast.json canonicalization-theorem.lisp > result.out || errors+=("$dir");
cd ../../..
done;
if [ ${#errors[@]} -eq 0 ]; then
echo "Success!"
else
echo "Failures:";
for i in ${ARRAY[@]};
for i in ${errors[@]};
do
echo $i;
cat tmp/tgc/$dir.out
done;
exit 1
fi