diff options
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/gna/issue450/testsuite.sh | 26 | ||||
-rwxr-xr-x | testsuite/gna/issue98/testsuite.sh | 24 |
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" |