tests: use `yosys-config --datdir` instead of hard-coded

This commit is contained in:
Eddie Hung 2020-04-22 08:29:45 -07:00
parent ae115fa3aa
commit 634b5e2d9f
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
set -e
rm -f plugin.so
CXXFLAGS=$(../../yosys-config --cxxflags)
CXXFLAGS=${CXXFLAGS// -I\/usr\/local\/share\/yosys\/include/ -I..\/..\/share\/include}
DATDIR=$(../../yosys-config --datdir)
DATDIR=${DATDIR//\//\\\/}
CXXFLAGS=${CXXFLAGS//$DATDIR/..\/..\/share}
../../yosys-config --exec --cxx ${CXXFLAGS} --ldflags -shared -o plugin.so plugin.cc
../../yosys -m ./plugin.so -p "test" | grep -q "Plugin test passed!"