diff options
author | Ben Reynwar <ben@reynwar.net> | 2020-05-19 22:35:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 07:35:27 +0200 |
commit | 4ae38ebfb077263cc24d63e84707322af39d0b0b (patch) | |
tree | d78e73c7b9eedf7417e3b5a77bd2839dab4b56db /testsuite/gna/issue1326/testsuite.sh | |
parent | 0e39a575da602ee833996c6ac30adc7c9069622e (diff) | |
download | ghdl-4ae38ebfb077263cc24d63e84707322af39d0b0b.tar.gz ghdl-4ae38ebfb077263cc24d63e84707322af39d0b0b.tar.bz2 ghdl-4ae38ebfb077263cc24d63e84707322af39d0b0b.zip |
ghwdump should handle zero-length signals (#1327)
* Adding a test for issue #1326 to check that ghwdump doesn't crash with a zero-length signal.
* Remove an assertion from ghwlib that prevents zero-length signals.
Diffstat (limited to 'testsuite/gna/issue1326/testsuite.sh')
-rwxr-xr-x | testsuite/gna/issue1326/testsuite.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/gna/issue1326/testsuite.sh b/testsuite/gna/issue1326/testsuite.sh new file mode 100755 index 000000000..e6b3262c8 --- /dev/null +++ b/testsuite/gna/issue1326/testsuite.sh @@ -0,0 +1,18 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze mytestbench.vhdl +elab mytestbench + +simulate mytestbench --wave=dump.ghw | tee mytestbench.out + +gcc ../../../src/grt/ghwdump.c ../../../src/grt/ghwlib.c -I../../../src/grt/ -o ghwdump + +# We're just checking that ghwdump doesn't crash on a zero length signal. +./ghwdump -ths dump.ghw > dump.txt + +rm -f mytestbench.out ghwdump dump.txt dump.ghw +clean + +echo "Test passed" |