aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/pyunit
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2020-12-28 21:50:49 +0100
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2020-12-28 21:50:49 +0100
commitf35dee7cd0c8e1a8a5dc856e502a92cab4640964 (patch)
tree6a0340a1cd7fc34cf475234a6389d827c000654e /testsuite/pyunit
parente5db6a80cf34db4b5ec84d8bd159fef837184e78 (diff)
downloadghdl-f35dee7cd0c8e1a8a5dc856e502a92cab4640964.tar.gz
ghdl-f35dee7cd0c8e1a8a5dc856e502a92cab4640964.tar.bz2
ghdl-f35dee7cd0c8e1a8a5dc856e502a92cab4640964.zip
Removed outdated files.
Diffstat (limited to 'testsuite/pyunit')
-rw-r--r--testsuite/pyunit/SimplePackage.vhdl21
-rw-r--r--testsuite/pyunit/testsuite.sh53
2 files changed, 74 insertions, 0 deletions
diff --git a/testsuite/pyunit/SimplePackage.vhdl b/testsuite/pyunit/SimplePackage.vhdl
new file mode 100644
index 000000000..f06cc32fa
--- /dev/null
+++ b/testsuite/pyunit/SimplePackage.vhdl
@@ -0,0 +1,21 @@
+library ieee;
+use ieee.numeric_std.all
+
+package pack_1 is
+ constant const_1 : boolean;
+
+ type matrix is array(natural range <>, natural range <>) of std_logic;
+
+ subtype matrix8x8 is matrix(7 downto 0, 7 downto 0);
+
+ function func1(value : unsigned) return natural;
+end package;
+
+package body pack_1 is
+ constant const_1 : boolean := true;
+
+ function func1(value : unsigned) return natural is
+ begin
+ return to_integer(value);
+ end function;
+end package body;
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