summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Rockai <prockai@redhat.com>2014-09-30 17:08:34 +0200
committerPetr Rockai <prockai@redhat.com>2014-11-18 19:02:07 +0100
commit8b3c90c84d2b0e2d234e806ef6e7801a69162b43 (patch)
treea83357a85ac234da8593d4b6cbea13e15b93f560
parenta0392e207c9d9e6caa506f7087a994e2e3d38021 (diff)
downloadlvm2-8b3c90c84d2b0e2d234e806ef6e7801a69162b43.tar.gz
test: Make lvm-wrapper available in the installed testsuite, too.
-rw-r--r--test/Makefile.in1
-rw-r--r--test/lib/lvm-wrapper.sh7
2 files changed, 7 insertions, 1 deletions
diff --git a/test/Makefile.in b/test/Makefile.in
index 690e7e457..e0652e128 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -145,6 +145,7 @@ install: .tests-stamp lib/paths-installed
$(INSTALL_DATA) lib/paths-installed $(DATADIR)/lib/paths
$(INSTALL_DATA) $(LIB_FLAVOURS) $(DATADIR)/lib/
$(INSTALL_SCRIPT) $(LIB_SHARED) $(DATADIR)/lib/
+ for i in $(CMDS); do (cd $(DATADIR)/lib && ln -fs lvm-wrapper $$i); done
$(INSTALL_DIR) $(EXECDIR)
$(INSTALL_PROGRAM) $(LIB_EXEC) $(EXECDIR)
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