summaryrefslogtreecommitdiff
path: root/test/api
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2016-11-26 00:17:40 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2016-11-26 00:22:38 +0100
commitb0bda090054db75995ea350f55b59ae8444690da (patch)
tree4a9e9f7fcbc1391e80f6a7698af628837d8796f2 /test/api
parent4a59cfaa1d4ffbaa46a762422b5439e9f7ce476a (diff)
downloadlvm2-b0bda090054db75995ea350f55b59ae8444690da.tar.gz
tests: ensure there is dbus config file
Copy lvmdbusd.profile to lib as installed place. Use TESTOLDPWD and avoid add new 'same' variable test_data_dir.
Diffstat (limited to 'test/api')
-rw-r--r--test/api/dbustest.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/api/dbustest.sh b/test/api/dbustest.sh
index 5ffe967c6..681e39930 100644
--- a/test/api/dbustest.sh
+++ b/test/api/dbustest.sh
@@ -20,13 +20,17 @@ aux prepare_pvs 6
# We need the lvmdbusd.profile for the daemon to utilize JSON
# output
-mkdir -p $TESTDIR/etc/profile/
-cp -v $TESTOLDPWD/../conf/lvmdbusd.profile $TESTDIR/etc/profile/.
+mkdir -p "$TESTDIR/etc/profile"
+cp -v "$TESTOLDPWD/lib/lvmdbusd.profile" "$TESTDIR/etc/profile/"
# Need to set this up so that the lvmdbusd service knows which
# binary to be running, which should be the one we just built
-export LVM_BINARY=$TESTOLDPWD/../tools/lvm
+export LVM_BINARY=$(which lvm 2>/dev/null)
+# skip if we don't have our own lvmetad...
+if test -z "${installed_testsuite+varset}"; then
+ (echo "$LVM_BINARY" | grep -q "$abs_builddir") || skip
+fi
aux prepare_lvmdbusd
-$test_data_dir/dbus/lvmdbustest.py -v
+$TESTOLDPWD/dbus/lvmdbustest.py -v