aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-12-11 18:39:50 +0100
committerTristan Gingold <tgingold@free.fr>2017-12-11 18:39:50 +0100
commit33ead847bce9c368356721e9cf236129b4624852 (patch)
treecee1342019f6d7715a42bc639a3ae535f07d8c76 /testsuite
parentb170fe9da0f13a2e3e6d82f4e8926df5f06e4a69 (diff)
downloadghdl-33ead847bce9c368356721e9cf236129b4624852.tar.gz
ghdl-33ead847bce9c368356721e9cf236129b4624852.tar.bz2
ghdl-33ead847bce9c368356721e9cf236129b4624852.zip
issue450, issue98: check vpi feature presence.
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/gna/issue450/testsuite.sh26
-rwxr-xr-xtestsuite/gna/issue98/testsuite.sh24
2 files changed, 29 insertions, 21 deletions
diff --git a/testsuite/gna/issue450/testsuite.sh b/testsuite/gna/issue450/testsuite.sh
index c41e34502..8850c41d7 100755
--- a/testsuite/gna/issue450/testsuite.sh
+++ b/testsuite/gna/issue450/testsuite.sh
@@ -2,20 +2,24 @@
. ../../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 disptree.vhdl
+elab disptree
-$GHDL --vpi-compile -v gcc -c vpi2.c
-$GHDL --vpi-link -v gcc -o vpi2.vpi vpi2.o
+if ghdl_has_feature disptree 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
-analyze disptree.vhdl
-elab_simulate disptree --vpi=./vpi2.vpi | tee disptree.out
-diff --strip-trailing-cr -q disptree.ref disptree.out
+ $GHDL --vpi-compile -v gcc -c vpi2.c
+ $GHDL --vpi-link -v gcc -o vpi2.vpi vpi2.o
-rm -f vpi2.o vpi2.vpi disptree.out
+ simulate disptree --vpi=./vpi2.vpi | tee disptree.out
+ diff --strip-trailing-cr -q disptree.ref disptree.out
+
+ rm -f vpi2.o vpi2.vpi disptree.out
+fi
clean
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"