]> sourceware.org Git - lvm2.git/commitdiff
test: Move bus configuration to prepare function
authorMarian Csontos <mcsontos@redhat.com>
Tue, 22 Mar 2016 08:15:40 +0000 (09:15 +0100)
committerMarian Csontos <mcsontos@redhat.com>
Wed, 23 Mar 2016 11:27:34 +0000 (12:27 +0100)
test/api/dbustest.sh
test/lib/aux.sh

index 79e3224c4f7174f15616c2d7fec8cbf98fad25bc..8741eb93c53ca0fd4de30e6c3ebae38d0065b0f2 100644 (file)
@@ -16,16 +16,7 @@ SKIP_WITH_CLVMD=1
 
 . lib/inittest
 
-# Will default to skip until we can get this reviewed
-#skip
-
 aux prepare_pvs 6
 
-# Copy the needed file to run on the system bus if it doesn't
-# already exist
-if [ ! -f /etc/dbus-1/system.d/com.redhat.lvmdbus1.conf ]; then
-       install -m 644 $abs_top_builddir/scripts/com.redhat.lvmdbus1.conf /etc/dbus-1/system.d/.
-fi
-
 aux prepare_lvmdbusd
 $test_data_dir/dbus/lvmdbustest.py -v
index 276788054461258397c6dc3a5d4f4101e57ffe7a..9fd1922e3dee84c45a94a260e95fad48f9eacfee 100644 (file)
@@ -306,6 +306,7 @@ prepare_lvmdbusd() {
 
        kill_sleep_kill_ LOCAL_LVMDBUSD 0
 
+        # FIXME: This is not correct! Daemon is auto started.
        echo "checking lvmdbusd is NOT running..."
        if ps -elf | grep lvmdbusd | grep python3; then
                echo "Cannot run while existing lvmdbusd process exists"
@@ -327,6 +328,13 @@ prepare_lvmdbusd() {
        which python3 >/dev/null || skip "Missing python3"
        python3 -c "import pyudev, dbus, gi.repository" || skip "Missing python modules"
 
+        # TODO: Tests should use session bus instead of system bus
+       # Copy the needed file to run on the system bus if it doesn't
+       # already exist
+       if [ ! -f /etc/dbus-1/system.d/com.redhat.lvmdbus1.conf ]; then
+               install -m 644 $abs_top_builddir/scripts/com.redhat.lvmdbus1.conf /etc/dbus-1/system.d/
+       fi
+
        echo "preparing lvmdbusd..."
        "$daemon" --debug --udev > debug.log_LVMDBUSD_out 2>&1 &
        local pid=$!
This page took 0.041715 seconds and 5 git commands to generate.