diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2022-04-21 16:46:13 +0100 |
---|---|---|
committer | John Levon <levon@movementarian.org> | 2022-05-09 23:28:10 +0100 |
commit | e254ff6f025a1e8316bafdb182e29b16a8ccf935 (patch) | |
tree | 9cb632a72fc13edfbcd1fcd651f4e13128489f47 /test | |
parent | abdf5e08b8329e5684976a738cd9f4ee447ffe5a (diff) | |
download | libvfio-user-e254ff6f025a1e8316bafdb182e29b16a8ccf935.zip libvfio-user-e254ff6f025a1e8316bafdb182e29b16a8ccf935.tar.gz libvfio-user-e254ff6f025a1e8316bafdb182e29b16a8ccf935.tar.bz2 |
test: optionally pass in 'client' and 'server' path
Rather than assuming the location of the client and server binaries,
allowing passing in explicit paths.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'test')
-rwxr-xr-x | test/test-client-server.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/test-client-server.sh b/test/test-client-server.sh index fc51b8a..360a863 100755 --- a/test/test-client-server.sh +++ b/test/test-client-server.sh @@ -2,6 +2,12 @@ set -e +CLIENT=../samples/client +SERVER=../samples/server + +test -n "$1" && CLIENT="$1" +test -n "$2" && SERVER="$2" + # # ASAN and valgrind, understandably, don't get along. # @@ -13,11 +19,11 @@ fi sock="/tmp/vfio-user.sock" rm -f ${sock}* -${valgrind} ../samples/server -v ${sock} & +${valgrind} $SERVER -v ${sock} & while [ ! -S ${sock} ]; do sleep 0.1 done -${valgrind} ../samples/client ${sock} || { +${valgrind} $CLIENT ${sock} || { kill $(jobs -p) exit 1 } |