diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2020-12-28 21:50:49 +0100 |
---|---|---|
committer | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2020-12-28 21:50:49 +0100 |
commit | f35dee7cd0c8e1a8a5dc856e502a92cab4640964 (patch) | |
tree | 6a0340a1cd7fc34cf475234a6389d827c000654e /testsuite/pyunit/testsuite.sh | |
parent | e5db6a80cf34db4b5ec84d8bd159fef837184e78 (diff) | |
download | ghdl-f35dee7cd0c8e1a8a5dc856e502a92cab4640964.tar.gz ghdl-f35dee7cd0c8e1a8a5dc856e502a92cab4640964.tar.bz2 ghdl-f35dee7cd0c8e1a8a5dc856e502a92cab4640964.zip |
Removed outdated files.
Diffstat (limited to 'testsuite/pyunit/testsuite.sh')
-rw-r--r-- | testsuite/pyunit/testsuite.sh | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/testsuite/pyunit/testsuite.sh b/testsuite/pyunit/testsuite.sh new file mode 100644 index 000000000..12b367f2c --- /dev/null +++ b/testsuite/pyunit/testsuite.sh @@ -0,0 +1,53 @@ +#! /bin/sh + +# Driver for a testsuite. + +set -e + +# This is the only place where test dirs are specified. Do not duplicate this +# line +dirs="*[0-9]" + +failures="" +full=n + +for opt; do + case "$opt" in + -k | --keep-going) full=y ;; + --dir=*) dirs=`echo $opt | sed -e 's/--dir=//'` ;; + --skip=*) d=`echo $opt | sed -e 's/--skip=//'` + dirs=`echo "" $dirs | sed -e "s/ $d//"` ;; + --start-at=*) d=`echo $opt | sed -e 's/--start-at=//'` + dirs=`echo "" $dirs | sed -e "s/^.* $d//"` + dirs="$d $dirs" ;; + --list-tests) echo $dirs; exit 0;; + *) echo "Unknown option $opt" + exit 2 + ;; + esac +done + +singlerun() { + echo "" + echo "dir $1:" + cd $1 + if ! ./testsuite.sh; then + echo "#################################################################" + echo "######### FAILURE: $1" + echo "#################################################################" + if [ $2 = "y" ]; then + failures="$failures $1" + else + exit 1; + fi + fi + cd .. +} + +for i in $dirs; do singlerun $i $full; done + +if [ x"$failures" = x"" ]; then + echo "tests are successful" && exit 0 +else + echo "test failed ($failures)" && exit 1 +fi |