All of lore.kernel.org
 help / color / mirror / Atom feed
* master - tests: properly check variables were defined
@ 2017-07-12 11:53 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2017-07-12 11:53 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c4b6df94b4a39335369c439eb3110a06649378e5
Commit:        c4b6df94b4a39335369c439eb3110a06649378e5
Parent:        1daa1cc3a98b8812912875773ad3be1b9b173c4c
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Wed Jul 12 13:51:16 2017 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Wed Jul 12 13:51:16 2017 +0200

tests: properly check variables were defined

When test suite is installed some vars are not defined.
---
 test/api/pytest.sh   |    2 +-
 test/lib/inittest.sh |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/api/pytest.sh b/test/api/pytest.sh
index ea53dbd..2581768 100644
--- a/test/api/pytest.sh
+++ b/test/api/pytest.sh
@@ -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
 
 #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))
   if [[ ${#python_lib[*]} -ne 1 ]]; then
     if [[ ${#python_lib[*]} -gt 1 ]]; then
diff --git a/test/lib/inittest.sh b/test/lib/inittest.sh
index c0f3e6b..f13b386 100644
--- a/test/lib/inittest.sh
+++ b/test/lib/inittest.sh
@@ -91,7 +91,7 @@ cd "$TESTDIR"
 mkdir 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' \
     -exec ln -s -t lib "{}" +
 find "$TESTOLDPWD/lib" ! \( -name '*.sh' -o -name '*.[cdo]' \



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-12 11:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-12 11:53 master - tests: properly check variables were defined Zdenek Kabelac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.