From e254ff6f025a1e8316bafdb182e29b16a8ccf935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 21 Apr 2022 16:46:13 +0100 Subject: test: optionally pass in 'client' and 'server' path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rather than assuming the location of the client and server binaries, allowing passing in explicit paths. Signed-off-by: Daniel P. Berrangé --- test/test-client-server.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test') 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 } -- cgit v1.1