aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtestsuite/gna/issue1226/testsuite.sh7
-rwxr-xr-xtestsuite/gna/issue1228/testsuite.sh6
-rwxr-xr-xtestsuite/gna/issue1233/testsuite.sh7
-rwxr-xr-xtestsuite/gna/issue1256/testsuite.sh7
-rwxr-xr-xtestsuite/gna/issue450/testsuite.sh6
-rwxr-xr-xtestsuite/gna/issue531/testsuite.sh6
-rwxr-xr-xtestsuite/gna/issue98/testsuite.sh6
-rw-r--r--testsuite/testenv.sh11
8 files changed, 18 insertions, 38 deletions
diff --git a/testsuite/gna/issue1226/testsuite.sh b/testsuite/gna/issue1226/testsuite.sh
index 056c85789..210e01058 100755
--- a/testsuite/gna/issue1226/testsuite.sh
+++ b/testsuite/gna/issue1226/testsuite.sh
@@ -6,12 +6,7 @@ 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
+ add_vpi_path
$GHDL --vpi-compile -v gcc -c vpi_plugin.c
$GHDL --vpi-link -v gcc -o vpi_plugin.vpi vpi_plugin.o
diff --git a/testsuite/gna/issue1228/testsuite.sh b/testsuite/gna/issue1228/testsuite.sh
index 9ddee2e05..1f80a4ab1 100755
--- a/testsuite/gna/issue1228/testsuite.sh
+++ b/testsuite/gna/issue1228/testsuite.sh
@@ -6,11 +6,7 @@ analyze test_load.vhdl
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
+ add_vpi_path
$GHDL --vpi-compile -v gcc $CFLAGS -c vpi1.c
$GHDL --vpi-link -v gcc $CFLAGS -o vpi1.vpi vpi1.o
diff --git a/testsuite/gna/issue1233/testsuite.sh b/testsuite/gna/issue1233/testsuite.sh
index 056c85789..210e01058 100755
--- a/testsuite/gna/issue1233/testsuite.sh
+++ b/testsuite/gna/issue1233/testsuite.sh
@@ -6,12 +6,7 @@ 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
+ add_vpi_path
$GHDL --vpi-compile -v gcc -c vpi_plugin.c
$GHDL --vpi-link -v gcc -o vpi_plugin.vpi vpi_plugin.o
diff --git a/testsuite/gna/issue1256/testsuite.sh b/testsuite/gna/issue1256/testsuite.sh
index 1bb44dcf1..33226a0ef 100755
--- a/testsuite/gna/issue1256/testsuite.sh
+++ b/testsuite/gna/issue1256/testsuite.sh
@@ -6,12 +6,7 @@ analyze enum_test.vhdl
elab enum_test
if ghdl_has_feature enum_test 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
+ add_vpi_path
$GHDL --vpi-compile -v gcc -c vpi_plugin.c
$GHDL --vpi-link -v gcc -o vpi_plugin.vpi vpi_plugin.o
diff --git a/testsuite/gna/issue450/testsuite.sh b/testsuite/gna/issue450/testsuite.sh
index 8850c41d7..5110fb676 100755
--- a/testsuite/gna/issue450/testsuite.sh
+++ b/testsuite/gna/issue450/testsuite.sh
@@ -6,11 +6,7 @@ analyze disptree.vhdl
elab disptree
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
+ add_vpi_path
$GHDL --vpi-compile -v gcc -c vpi2.c
$GHDL --vpi-link -v gcc -o vpi2.vpi vpi2.o
diff --git a/testsuite/gna/issue531/testsuite.sh b/testsuite/gna/issue531/testsuite.sh
index 4b2ee49aa..cf8d1b71b 100755
--- a/testsuite/gna/issue531/testsuite.sh
+++ b/testsuite/gna/issue531/testsuite.sh
@@ -9,11 +9,7 @@ if ghdl_has_feature sliced_ex vpi; then
$GHDL --vpi-compile -v gcc -c vpi1.c
$GHDL --vpi-link -v gcc -o vpi1.vpi vpi1.o
- 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
+ add_vpi_path
simulate sliced_ex --vpi=./vpi1.vpi | tee sliced_ex.out
if grep -q Error sliced_ex.out; then
diff --git a/testsuite/gna/issue98/testsuite.sh b/testsuite/gna/issue98/testsuite.sh
index 8f6ae63f1..6720d81eb 100755
--- a/testsuite/gna/issue98/testsuite.sh
+++ b/testsuite/gna/issue98/testsuite.sh
@@ -6,11 +6,7 @@ analyze test_load.vhdl
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
+ add_vpi_path
$GHDL --vpi-compile -v gcc -c vpi1.c
$GHDL --vpi-link -v gcc -o vpi1.vpi vpi1.o
diff --git a/testsuite/testenv.sh b/testsuite/testenv.sh
index c3b6f6556..400a5e261 100644
--- a/testsuite/testenv.sh
+++ b/testsuite/testenv.sh
@@ -170,6 +170,17 @@ run_failure ()
fi
}
+# Be sure vpi can be used
+add_vpi_path()
+{
+ 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
+}
+
# Clean the environment
clean ()
{