# HG changeset patch # User Paul Boddie # Date 1484085646 -3600 # Node ID bd484709f70de7ee887aee8148c1fe545e341319 # Parent aebbc02d5dfe5cdc2d9699ddcefb659051288e3c Added help text and reordered some statements. diff -r aebbc02d5dfe -r bd484709f70d test_all.sh --- a/test_all.sh Tue Jan 10 21:41:46 2017 +0100 +++ b/test_all.sh Tue Jan 10 23:00:46 2017 +0100 @@ -1,7 +1,29 @@ #!/bin/sh +# This tool runs the toolchain for each of the tests, optionally building and +# running the test programs. +# +# Copyright (C) 2016 Paul Boddie +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 3 of the License, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see . + +PROGNAME=$0 +OPTION=$1 + LPLC="./lplc" DATADIR="_lplc" +TESTINPUT="_results/testinput.txt" # Expect failure from the "bad" tests. @@ -27,19 +49,46 @@ # Main program. -OPTION=$1 -TESTINPUT="_results/testinput.txt" +# Show help if requested. + +if [ "$OPTION" = '--help' ] ; then + cat 1>&2 <