aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-11-05 04:15:17 +0100
committerTristan Gingold <tgingold@free.fr>2019-11-05 04:15:17 +0100
commitf9796ff6c48a352e4bef1de793759784c34007d2 (patch)
treeb33e9d0a384d090c34de2ca7d670ac63173319df /testsuite
parent73e03cbc9b07dbc1bfc75be3baf8fd9fc66e32d8 (diff)
downloadghdl-yosys-plugin-f9796ff6c48a352e4bef1de793759784c34007d2.tar.gz
ghdl-yosys-plugin-f9796ff6c48a352e4bef1de793759784c34007d2.tar.bz2
ghdl-yosys-plugin-f9796ff6c48a352e4bef1de793759784c34007d2.zip
testenv: use abs_topdir for default ghdl.so path.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/testenv.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/testsuite/testenv.sh b/testsuite/testenv.sh
index 086a1f4..fd36439 100644
--- a/testsuite/testenv.sh
+++ b/testsuite/testenv.sh
@@ -1,6 +1,12 @@
# Testsuite environment
+if [ x"$topdir" = x"" ]; then
+ echo "topdir must be defined"
+ exit 1
+fi
+
. $topdir/../utils.sh
+abs_topdir=`pwd`/$topdir
set -e
@@ -9,7 +15,8 @@ if [ x"$GHDL" = x ]; then
fi
if [ x"$YOSYS" = x ]; then
- YOSYS="yosys -m ../../ghdl.so"
+ # Need to use abs_topdir because with sby yosys is executed in a subdir.
+ YOSYS="yosys -m $abs_topdir/../ghdl.so"
fi
if [ x"$SYMBIYOSYS" = x ]; then