summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Rockai <prockai@redhat.com>2014-09-30 17:08:34 +0200
committerPetr Rockai <prockai@redhat.com>2014-10-01 08:22:54 +0200
commitbaf64136972b495cebfe45e1a7cef6df6728ccfd (patch)
tree816f500230bb6ba0e228fe9743d6e2b16597c94f
parentc3ed2de3369afd415689af4cf9859a6ef8d69474 (diff)
downloadlvm2-baf64136972b495cebfe45e1a7cef6df6728ccfd.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 2aa75be04..fc74d32bc 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -136,6 +136,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