diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2021-02-01 09:47:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-01 09:47:16 +0000 |
commit | cfa10a52e23587118d7432c960ecdd213cda3e91 (patch) | |
tree | 8c78414102fd054444e8084fb8b71454076d8349 /test | |
parent | c17c85a24005a1e72b0db060ad3895370a02a426 (diff) | |
download | libvfio-user-cfa10a52e23587118d7432c960ecdd213cda3e91.zip libvfio-user-cfa10a52e23587118d7432c960ecdd213cda3e91.tar.gz libvfio-user-cfa10a52e23587118d7432c960ecdd213cda3e91.tar.bz2 |
run client/server sample in CI (#274)
run client/server sample in CI
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 1 | ||||
-rwxr-xr-x | test/test-client-server.sh | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 9c51d4d..d51e153 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -57,3 +57,4 @@ target_link_libraries(unit-tests PUBLIC "-Wl,--wrap=process_request") enable_testing() add_test(NAME unit-tests COMMAND unit-tests) add_test(NAME lspci COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/test-lspci.sh) +add_test(NAME client-server COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/test-client-server.sh) diff --git a/test/test-client-server.sh b/test/test-client-server.sh new file mode 100755 index 0000000..397f312 --- /dev/null +++ b/test/test-client-server.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +sock="/tmp/vfio-user.sock" +rm -f ${sock}* +../samples/server -v ${sock} & +server_pid=$! +while [ ! -S ${sock} ]; do + sleep 0.1 +done +../samples/client ${sock} +wait |