aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/ticket77/testsuite.sh
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-05-21 07:01:07 +0200
committerTristan Gingold <tgingold@free.fr>2015-05-21 07:01:07 +0200
commit4f86c7d4b92d4821b11396c4ff7c9fa5b818c6a7 (patch)
tree9245a0490d1c7e15251233ea0d37e1421de8e7b1 /testsuite/gna/ticket77/testsuite.sh
parent3826656eaff634b0349b610f274203b3026d3f87 (diff)
downloadghdl-4f86c7d4b92d4821b11396c4ff7c9fa5b818c6a7.tar.gz
ghdl-4f86c7d4b92d4821b11396c4ff7c9fa5b818c6a7.tar.bz2
ghdl-4f86c7d4b92d4821b11396c4ff7c9fa5b818c6a7.zip
Add testcases for ticket 77
Diffstat (limited to 'testsuite/gna/ticket77/testsuite.sh')
-rwxr-xr-xtestsuite/gna/ticket77/testsuite.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/gna/ticket77/testsuite.sh b/testsuite/gna/ticket77/testsuite.sh
new file mode 100755
index 000000000..cc5d75451
--- /dev/null
+++ b/testsuite/gna/ticket77/testsuite.sh
@@ -0,0 +1,30 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_elab_simulate_status()
+{
+ file=$1
+ ent=$2
+ status=$3
+
+ analyze $file
+ set +e
+ echo "elaborate and simulate $ent"
+ $GHDL --elab-run $GHDL_STD_FLAGS $ent
+ if [ $? -ne $status ]; then
+ echo "Exit status $status expected"
+ exit 1
+ fi
+ set -e
+}
+
+GHDL_STD_FLAGS=--std=08
+analyze_elab_simulate_status bug1.vhdl ent1 1
+analyze_elab_simulate_status bug2.vhdl ent2 1
+analyze_elab_simulate_status bug3.vhdl ent3 7
+analyze_elab_simulate_status bug4.vhdl ent4 0
+
+clean
+
+echo "Test successful"