From 18fb66bcec7b88301f949e586dbd773b8e3ee067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 21 Apr 2022 16:50:52 +0100 Subject: test: pass in location of libvfio-user.so library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test currently hardwires a location based on where cmake creates binaries. Pass in an explicit location via LIBVFIO_SO_DIR env variable, to override this hardwired default. Signed-off-by: Daniel P. Berrangé --- test/py/libvfio_user.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') 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) -- cgit v1.1