From f2c8d0dc116b3e986aa79a498b268ed2600fd39e Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Wed, 10 May 2017 15:20:06 -0700 Subject: [PATCH] test/iscsi_tgt: exit rbd.sh if CEPH_DIR not defined This allows the iscsi_tgt tests to be run more easily in isolation. Signed-off-by: Jim Harris Change-Id: I1fa87e8b02f6e6ed62c75f07471d93ce84da30c2 --- test/iscsi_tgt/rbd/rbd.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/iscsi_tgt/rbd/rbd.sh b/test/iscsi_tgt/rbd/rbd.sh index 460900ed0..a6fb54cb4 100755 --- a/test/iscsi_tgt/rbd/rbd.sh +++ b/test/iscsi_tgt/rbd/rbd.sh @@ -4,6 +4,11 @@ testdir=$(readlink -f $(dirname $0)) rootdir=$(readlink -f $testdir/../../..) source $rootdir/scripts/autotest_common.sh +if [ -z $CEPH_DIR ]; then + echo "Ceph directory not defined; skipping RBD tests" + exit 0 +fi + if [ ! -d $CEPH_DIR ]; then echo "Ceph directory not detected on this system; skipping RBD tests" exit 0