diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2022-04-21 16:50:52 +0100 |
---|---|---|
committer | John Levon <levon@movementarian.org> | 2022-05-09 23:28:10 +0100 |
commit | 18fb66bcec7b88301f949e586dbd773b8e3ee067 (patch) | |
tree | 863a036ca29873ec157634752074a2450535232e /test/py | |
parent | e254ff6f025a1e8316bafdb182e29b16a8ccf935 (diff) | |
download | libvfio-user-18fb66bcec7b88301f949e586dbd773b8e3ee067.zip libvfio-user-18fb66bcec7b88301f949e586dbd773b8e3ee067.tar.gz libvfio-user-18fb66bcec7b88301f949e586dbd773b8e3ee067.tar.bz2 |
test: pass in location of libvfio-user.so library
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é <berrange@redhat.com>
Diffstat (limited to 'test/py')
-rw-r--r-- | test/py/libvfio_user.py | 2 |
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) |