summaryrefslogtreecommitdiff
path: root/testsuite/gna
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna')
-rw-r--r--testsuite/gna/ticket77/bug1.vhdl12
-rw-r--r--testsuite/gna/ticket77/bug2.vhdl12
-rw-r--r--testsuite/gna/ticket77/bug3.vhdl12
-rw-r--r--testsuite/gna/ticket77/bug4.vhdl12
-rwxr-xr-xtestsuite/gna/ticket77/testsuite.sh30
5 files changed, 78 insertions, 0 deletions
diff --git a/testsuite/gna/ticket77/bug1.vhdl b/testsuite/gna/ticket77/bug1.vhdl
new file mode 100644
index 0000000..444230c
--- /dev/null
+++ b/testsuite/gna/ticket77/bug1.vhdl
@@ -0,0 +1,12 @@
+entity ent1 is
+end entity;
+
+architecture a of ent1 is
+begin
+ main : process
+ begin
+ wait for 0 ns; -- Comment and it exits with code 1
+ std.env.stop(1);
+ wait;
+ end process;
+end architecture;
diff --git a/testsuite/gna/ticket77/bug2.vhdl b/testsuite/gna/ticket77/bug2.vhdl
new file mode 100644
index 0000000..b666d5e
--- /dev/null
+++ b/testsuite/gna/ticket77/bug2.vhdl
@@ -0,0 +1,12 @@
+entity ent2 is
+end entity;
+
+architecture a of ent2 is
+begin
+ main : process
+ begin
+-- wait for 0 ns; -- Comment and it exits with code 1
+ std.env.stop(1);
+ wait;
+ end process;
+end architecture;
diff --git a/testsuite/gna/ticket77/bug3.vhdl b/testsuite/gna/ticket77/bug3.vhdl
new file mode 100644
index 0000000..429ccd3
--- /dev/null
+++ b/testsuite/gna/ticket77/bug3.vhdl
@@ -0,0 +1,12 @@
+entity ent3 is
+end entity;
+
+architecture a of ent3 is
+begin
+ main : process
+ begin
+-- wait for 0 ns; -- Comment and it exits with code 1
+ std.env.stop(7);
+ wait;
+ end process;
+end architecture;
diff --git a/testsuite/gna/ticket77/bug4.vhdl b/testsuite/gna/ticket77/bug4.vhdl
new file mode 100644
index 0000000..a1f927d
--- /dev/null
+++ b/testsuite/gna/ticket77/bug4.vhdl
@@ -0,0 +1,12 @@
+entity ent4 is
+end entity;
+
+architecture a of ent4 is
+begin
+ main : process
+ begin
+-- wait for 0 ns; -- Comment and it exits with code 1
+ std.env.stop(0);
+ wait;
+ end process;
+end architecture;
diff --git a/testsuite/gna/ticket77/testsuite.sh b/testsuite/gna/ticket77/testsuite.sh
new file mode 100755
index 0000000..cc5d754
--- /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"