From 47c45d243ad7e8dbd77a4bacb11c62f0933d2eb5 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Thu, 24 Sep 2020 05:28:21 +0000 Subject: [PATCH] test: do not try to execute blob_ut if it doesn't exist We do not compile blob_ut on systems with Cunit version that is too old. So modify unittest.sh for this case specifically, so that users with an older Cunit version can still run the rest of the unit tests. Fixes issue #1601. Signed-off-by: Jim Harris Change-Id: Ifd226a47a2ff712ad1f14fd12e1cb796e44be6b5 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4372 Reviewed-by: Changpeng Liu Reviewed-by: Aleksey Marchuk Reviewed-by: Liang Yan Reviewed-by: Ben Walker Reviewed-by: Tested-by: SPDK CI Jenkins --- test/unit/unittest.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/unit/unittest.sh b/test/unit/unittest.sh index 39bfdbb4a..b6a9774ec 100755 --- a/test/unit/unittest.sh +++ b/test/unit/unittest.sh @@ -26,7 +26,11 @@ function unittest_bdev() { } function unittest_blob() { - $valgrind $testdir/lib/blob/blob.c/blob_ut + # We do not compile blob_ut on systems with too old Cunit, so do + # not try to execute it if it doesn't exist + if [[ -e $testdir/lib/blob/blob.c/blob_ut ]]; then + $valgrind $testdir/lib/blob/blob.c/blob_ut + fi $valgrind $testdir/lib/blobfs/tree.c/tree_ut $valgrind $testdir/lib/blobfs/blobfs_async_ut/blobfs_async_ut # blobfs_sync_ut hangs when run under valgrind, so don't use $valgrind