1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

tests: properly check variables were defined

When test suite is installed some vars are not defined.
This commit is contained in:
Zdenek Kabelac 2017-07-12 13:51:16 +02:00
parent 1daa1cc3a9
commit c4b6df94b4
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ aux prepare_dmeventd
# gdb -ex r --args python FULL_PATH/lvm2/test/api/python_lvm_unit.py -v TestLvm.test_lv_active_inactive # 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. #Locate the python binding library to use.
if [[ -n "$abs_top_builddir" ]]; then if [[ -n "${abs_top_builddir+varset}" ]]; then
python_lib=($(find "$abs_top_builddir" -name lvm.so)) python_lib=($(find "$abs_top_builddir" -name lvm.so))
if [[ ${#python_lib[*]} -ne 1 ]]; then if [[ ${#python_lib[*]} -ne 1 ]]; then
if [[ ${#python_lib[*]} -gt 1 ]]; then if [[ ${#python_lib[*]} -gt 1 ]]; then

View File

@ -91,7 +91,7 @@ cd "$TESTDIR"
mkdir lib mkdir lib
# Setting up symlink from $i to $TESTDIR/lib # Setting up symlink from $i to $TESTDIR/lib
test -n "$abs_top_builddir" && \ test -n "${abs_top_builddir+varset}" && \
find "$abs_top_builddir/daemons/dmeventd/plugins/" -name '*.so' \ find "$abs_top_builddir/daemons/dmeventd/plugins/" -name '*.so' \
-exec ln -s -t lib "{}" + -exec ln -s -t lib "{}" +
find "$TESTOLDPWD/lib" ! \( -name '*.sh' -o -name '*.[cdo]' \ find "$TESTOLDPWD/lib" ! \( -name '*.sh' -o -name '*.[cdo]' \