aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1206/testsuite.sh
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-11 08:12:39 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-11 08:12:39 +0200
commit93d01c6d4abd22e8e0fd46a13727034de97ae783 (patch)
treeaa3c7429f05b3e4d216723455980359ab6585071 /testsuite/gna/issue1206/testsuite.sh
parent7a211109152e82843a59ba70b0a080ce91b9b495 (diff)
downloadghdl-93d01c6d4abd22e8e0fd46a13727034de97ae783.tar.gz
ghdl-93d01c6d4abd22e8e0fd46a13727034de97ae783.tar.bz2
ghdl-93d01c6d4abd22e8e0fd46a13727034de97ae783.zip
testsuite/gna: add a test for #1206
Diffstat (limited to 'testsuite/gna/issue1206/testsuite.sh')
-rwxr-xr-xtestsuite/gna/issue1206/testsuite.sh21
1 files changed, 21 insertions, 0 deletions
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"