diff options
Diffstat (limited to 'testsuite/gna/issue1226/testsuite.sh')
-rwxr-xr-x | testsuite/gna/issue1226/testsuite.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/gna/issue1226/testsuite.sh b/testsuite/gna/issue1226/testsuite.sh new file mode 100755 index 000000000..056c85789 --- /dev/null +++ b/testsuite/gna/issue1226/testsuite.sh @@ -0,0 +1,25 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze adder.vhdl +elab adder + +if ghdl_has_feature adder vpi; then + if [ "$OS" = "Windows_NT" ]; then + # Need to put the directory containing libghdlvpi.dll in the path. + 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 + + $GHDL --vpi-compile -v gcc -c vpi_plugin.c + $GHDL --vpi-link -v gcc -o vpi_plugin.vpi vpi_plugin.o + + simulate adder --vpi=./vpi_plugin.vpi + + rm -f vpi_plugin.vpi vpi_plugin.o +fi +clean + +echo "Test successful" |