From bc6ad13930a62f027d673141b37e3d0ebc1cdb42 Mon Sep 17 00:00:00 2001 From: damirka Date: Wed, 18 Aug 2021 14:53:18 +0300 Subject: [PATCH] adds exit code and error printing --- .github/workflows/acl2.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/acl2.yml b/.github/workflows/acl2.yml index c1d269622b..7ab8908a31 100644 --- a/.github/workflows/acl2.yml +++ b/.github/workflows/acl2.yml @@ -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; - echo "Failures:"; - for i in ${ARRAY[@]}; - do - echo $i; - done; + + if [ ${#errors[@]} -eq 0 ]; then + echo "Success!" + else + echo "Failures:"; + for i in ${errors[@]}; + do + echo $i; + cat tmp/tgc/$dir.out + done; + exit 1 + fi