summaryrefslogtreecommitdiff
path: root/testsuite/gna/testsuite.sh
diff options
context:
space:
mode:
authorTristan Gingold2013-12-18 05:53:22 +0100
committerTristan Gingold2013-12-18 05:53:22 +0100
commitbd4aff0f670351c0652cf24e9b04361dc0e3a01c (patch)
treeafcc1050ac74fc64b5756e2550bc32ea61d1e7bb /testsuite/gna/testsuite.sh
parent5fde24d46fae799e6c0723850097a8fccd64d747 (diff)
downloadghdl-bd4aff0f670351c0652cf24e9b04361dc0e3a01c.tar.gz
ghdl-bd4aff0f670351c0652cf24e9b04361dc0e3a01c.tar.bz2
ghdl-bd4aff0f670351c0652cf24e9b04361dc0e3a01c.zip
Add initial testsuite, using regression tests from bugs or support
reported on gna.org
Diffstat (limited to 'testsuite/gna/testsuite.sh')
-rwxr-xr-xtestsuite/gna/testsuite.sh48
1 files changed, 48 insertions, 0 deletions
diff --git a/testsuite/gna/testsuite.sh b/testsuite/gna/testsuite.sh
new file mode 100755
index 0000000..3f14c5d
--- /dev/null
+++ b/testsuite/gna/testsuite.sh
@@ -0,0 +1,48 @@
+#! /bin/sh
+
+# Driver for the GNA testsuite.
+# Each test correspond to one report, and is put in one directory (using
+# the support/bug number)
+
+set -e
+
+dirs="bug* sr*"
+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" ;;
+ *) echo "Unknown option $opt"
+ exit 2
+ ;;
+ esac
+done
+
+for i in $dirs; do
+ echo "GNA dir $i:"
+ cd $i
+ if ! ./testsuite.sh; then
+ if [ $full = "y" ]; then
+ failures="$failures $i"
+ else
+ exit 1;
+ fi
+ fi
+ cd ..
+done
+
+if [ x"$failures" = x"" ]; then
+ echo "GNA tests are successful"
+ exit 0
+else
+ echo "GNA test failed ($failures)"
+ exit 1
+fi
+