diff --git a/test/api/dbustest.sh b/test/api/dbustest.sh index 681e39930..5817e01f9 100644 --- a/test/api/dbustest.sh +++ b/test/api/dbustest.sh @@ -25,7 +25,9 @@ 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=$(which lvm 2>/dev/null) +LVM_BINARY=$(which lvm 2>/dev/null) +export LVM_BINARY + # skip if we don't have our own lvmetad... if test -z "${installed_testsuite+varset}"; then (echo "$LVM_BINARY" | grep -q "$abs_builddir") || skip @@ -33,4 +35,4 @@ fi aux prepare_lvmdbusd -$TESTOLDPWD/dbus/lvmdbustest.py -v +"$TESTOLDPWD/dbus/lvmdbustest.py" -v diff --git a/test/api/pytest.sh b/test/api/pytest.sh index 28a1cd02c..e4e09946d 100644 --- a/test/api/pytest.sh +++ b/test/api/pytest.sh @@ -30,8 +30,8 @@ aux prepare_dmeventd # gdb -ex r --args python FULL_PATH/lvm2/test/api/python_lvm_unit.py -v TestLvm.test_lv_active_inactive #Locate the python binding library to use. -if [[ -n $abs_top_builddir ]]; then - python_lib=($(find $abs_top_builddir -name lvm.so)) +if [[ -n "$abs_top_builddir" ]]; then + python_lib=($(find "$abs_top_builddir" -name lvm.so)) if [[ ${#python_lib[*]} -ne 1 ]]; then if [[ ${#python_lib[*]} -gt 1 ]]; then # Unable to test python bindings if multiple libraries found: @@ -43,7 +43,8 @@ if [[ -n $abs_top_builddir ]]; then fi fi - export PYTHONPATH=$(dirname $python_lib):$PYTHONPATH + PYTHONPATH=$(dirname "${python_lib[*]}"):$PYTHONPATH + export PYTHONPATH elif rpm -q lvm2-python-libs &>/dev/null; then true else @@ -54,7 +55,8 @@ fi aux prepare_pvs 6 #Setup which devices the unit test can use. -export PY_UNIT_PVS=$(cat DEVICES) +PY_UNIT_PVS=$(cat DEVICES) +export PY_UNIT_PVS #python_lvm_unit.py -v -f diff --git a/test/api/vglist.sh b/test/api/vglist.sh index c76a92b76..b07cac921 100644 --- a/test/api/vglist.sh +++ b/test/api/vglist.sh @@ -14,4 +14,4 @@ SKIP_WITH_LVMPOLLD=1 . lib/inittest aux prepare_vg 2 -aux apitest vglist $vg `get vg_field $vg vg_uuid | sed -e s,-,,g` +aux apitest vglist $vg "$(get vg_field $vg vg_uuid | sed -e s,-,,g)"