summaryrefslogtreecommitdiff
path: root/test/lib/lvm-wrapper.sh
diff options
context:
space:
mode:
authorPetr Rockai <prockai@redhat.com>2014-09-30 17:08:34 +0200
committerPetr Rockai <prockai@redhat.com>2015-02-05 13:50:33 +0100
commita6d006d9db033e8251fd58848f8876b3e3d0fe90 (patch)
tree9b54d7aeb863080054ed38b91784a2f019aaf33a /test/lib/lvm-wrapper.sh
parent41c2e07a8dee3d3e5212c7c1939ddbd4624d3bed (diff)
downloadlvm2-a6d006d9db033e8251fd58848f8876b3e3d0fe90.tar.gz
test: Make lvm-wrapper available in the installed testsuite, too.
Diffstat (limited to 'test/lib/lvm-wrapper.sh')
-rw-r--r--test/lib/lvm-wrapper.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/lib/lvm-wrapper.sh b/test/lib/lvm-wrapper.sh
index 082c6405b..013bc1399 100644
--- a/test/lib/lvm-wrapper.sh
+++ b/test/lib/lvm-wrapper.sh
@@ -36,4 +36,9 @@ if test -n "$LVM_VALGRIND"; then
fi
# the exec is important, because otherwise fatal signals inside "not" go unnoticed
-exec $RUN_VALGRIND "$abs_top_builddir/tools/lvm" $CMD "$@"
+if test -n "$abs_top_builddir"; then
+ exec $RUN_DBG "$abs_top_builddir/tools/lvm" $CMD "$@"
+else # we are testing the lvm on $PATH
+ PATH=`echo $PATH | sed -e s,[^:]*lvm2-testsuite[^:]*:,,g`
+ exec $RUN_DBG lvm $CMD "$@"
+fi