aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue98/testsuite.sh
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/issue98/testsuite.sh')
-rwxr-xr-xtestsuite/gna/issue98/testsuite.sh24
1 files changed, 14 insertions, 10 deletions
diff --git a/testsuite/gna/issue98/testsuite.sh b/testsuite/gna/issue98/testsuite.sh
index f30613c5f..8f6ae63f1 100755
--- a/testsuite/gna/issue98/testsuite.sh
+++ b/testsuite/gna/issue98/testsuite.sh
@@ -2,19 +2,23 @@
. ../../testenv.sh
-if [ "$OS" = "Windows_NT" ]; then
- vpi_lib=`$GHDL --vpi-library-dir | sed -e 's!\\\\!/!g' -e 's!^C:!/C!g'`
- echo vpi_lib: $vpi_lib
- PATH="$PATH:$vpi_lib"
-fi
-
analyze test_load.vhdl
-$GHDL --vpi-compile -v gcc -c vpi1.c
-$GHDL --vpi-link -v gcc -o vpi1.vpi vpi1.o
+elab test_load
+
+if ghdl_has_feature test_load vpi; then
+ if [ "$OS" = "Windows_NT" ]; then
+ vpi_lib=`$GHDL --vpi-library-dir | sed -e 's!\\\\!/!g' -e 's!^C:!/C!g'`
+ echo vpi_lib: $vpi_lib
+ PATH="$PATH:$vpi_lib"
+ fi
-elab_simulate test_load --vpi=./vpi1.vpi
+ $GHDL --vpi-compile -v gcc -c vpi1.c
+ $GHDL --vpi-link -v gcc -o vpi1.vpi vpi1.o
-rm -f vpi1.vpi vpi1.o
+ simulate test_load --vpi=./vpi1.vpi
+
+ rm -f vpi1.vpi vpi1.o
+fi
clean
echo "Test successful"