aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/py/libvfio_user.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/py/libvfio_user.py b/test/py/libvfio_user.py
index e8a7e68..25ae90e 100644
--- a/test/py/libvfio_user.py
+++ b/test/py/libvfio_user.py
@@ -226,6 +226,8 @@ SOCK_PATH = b"/tmp/vfio-user.sock.%d" % os.getpid()
topdir = os.path.realpath(os.path.dirname(__file__) + "/../..")
build_type = os.getenv("BUILD_TYPE", default="dbg")
libname = "%s/build/%s/lib/libvfio-user.so" % (topdir, build_type)
+if not os.path.exists(libname):
+ libname = os.path.join(os.getenv("LIBVFIO_SO_DIR"), "libvfio-user.so")
lib = c.CDLL(libname, use_errno=True)
libc = c.CDLL("libc.so.6", use_errno=True)