Skip to content

Commit

Permalink
TEST: more informative failure messages
Browse files Browse the repository at this point in the history
  • Loading branch information
slivingston committed Dec 30, 2023
1 parent 43a5287 commit c7cd36c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test-gr1c.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ done
if test $VERBOSE -eq 1; then
echo "\nChecking syntax for examples of DOT output..."
fi
if ! (dot -V > /dev/null); then
echo $PREFACE "GraphViz dot not installed. Tests require it to check DOT syntax.\n"
exit 1
fi
if ! ($BUILD_ROOT/gr1c -t dot specs/trivial_2var.spc | dot -Tsvg > /dev/null); then
echo $PREFACE "syntax error in DOT output from gr1c on specs/trivial_2var.spc\n"
exit 1
Expand All @@ -111,6 +115,10 @@ fi
if test $VERBOSE -eq 1; then
echo "\nChecking syntax for examples of JSON output..."
fi
if ! (python -V > /dev/null); then
echo $PREFACE "Python not installed. Tests require it to check JSON syntax.\n"
exit 1
fi
if ! ($BUILD_ROOT/gr1c -t json specs/trivial_2var.spc | python -m json.tool > /dev/null); then
echo $PREFACE "syntax error in JSON output from gr1c on specs/trivial_2var.spc\n"
exit 1
Expand Down

0 comments on commit c7cd36c

Please sign in to comment.