diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-04-11 08:12:39 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-04-11 08:12:39 +0200 |
commit | 93d01c6d4abd22e8e0fd46a13727034de97ae783 (patch) | |
tree | aa3c7429f05b3e4d216723455980359ab6585071 /testsuite/gna/issue1206 | |
parent | 7a211109152e82843a59ba70b0a080ce91b9b495 (diff) | |
download | ghdl-93d01c6d4abd22e8e0fd46a13727034de97ae783.tar.gz ghdl-93d01c6d4abd22e8e0fd46a13727034de97ae783.tar.bz2 ghdl-93d01c6d4abd22e8e0fd46a13727034de97ae783.zip |
testsuite/gna: add a test for #1206
Diffstat (limited to 'testsuite/gna/issue1206')
-rw-r--r-- | testsuite/gna/issue1206/hello.vhdl | 7 | ||||
-rw-r--r-- | testsuite/gna/issue1206/main.c | 8 | ||||
-rwxr-xr-x | testsuite/gna/issue1206/testsuite.sh | 21 |
3 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/gna/issue1206/hello.vhdl b/testsuite/gna/issue1206/hello.vhdl new file mode 100644 index 000000000..792aae2bd --- /dev/null +++ b/testsuite/gna/issue1206/hello.vhdl @@ -0,0 +1,7 @@ +entity hello is +end hello; + +architecture behav of hello is +begin + assert false report "Hello VHDL world" severity note; +end behav; diff --git a/testsuite/gna/issue1206/main.c b/testsuite/gna/issue1206/main.c new file mode 100644 index 000000000..ede4b2354 --- /dev/null +++ b/testsuite/gna/issue1206/main.c @@ -0,0 +1,8 @@ +#include <stdio.h> + +extern int ghdl_main(int argc, char** argv); + +int main(int argc, char** argv) { + printf("ghdl_main: %d\n", ghdl_main(0, NULL)); + return 0; +} diff --git a/testsuite/gna/issue1206/testsuite.sh b/testsuite/gna/issue1206/testsuite.sh new file mode 100755 index 000000000..bd0773227 --- /dev/null +++ b/testsuite/gna/issue1206/testsuite.sh @@ -0,0 +1,21 @@ +#! /bin/sh + +. ../../testenv.sh + +if $GHDL --help | grep -q -e --link; then + if [ -z $CC ]; then + CC="gcc" + fi + + $CC -c main.c + analyze hello.vhdl + elab -Wl,main.o hello + run ./hello + + clean + rm -f main.o +else + echo "Test not supported by the configuration" +fi + +echo "Test successful" |