[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] RFC: testing framework


It's very nice to have this sort of regression tests in the tree.

Jim Meyering wrote:
> There are kludges in t/Makefile.in (symlink creation and LD_LIBRARY_PATH
> setting), that are required to run the dynamically-linked lvm against the
> libraries in a just-compiled sibling device-mapper directory.  Thanks to
> Dave Wysochanski for that tip.  IMHO this is a very strong argument
> for pulling device-mapper into lvm.  Alasdair, can we do that soon?
> I'll be happy to submit a patch.

It didn't work for me because I have device-mapper source directory
named '../device-mapper.work', instead of '../device-mapper' that
Makefile assumes.
There is '--with-dmdir=DIR' option for configure.
Can the Makefile use it?
(A patch is attached.)

Jun'ichi Nomura, NEC Corporation of America

Index: LVM2.work/t/Makefile.in
--- LVM2.work.orig/t/Makefile.in
+++ LVM2.work/t/Makefile.in
@@ -40,13 +40,16 @@ $(T): init.sh
 	@echo "*** $@ ***"; '$(SHELL_PATH_SQ)' \
-dmdir = $(abs_top_srcdir)/../device-mapper
-so_name = $(dmdir)/lib/ioctl/libdevmapper.so.1.02
+ifneq ("@DMDIR@", "")
+  so_name = @DMDIR@/lib/ioctl/libdevmapper.so.1.02
 # Having to create this link is a huge kludge,
 # and a major argument for including device-mapper in lvm.
 .bin-dir: lvm-wrapper
+ifneq ("@DMDIR@", "")
 	ln -fs libdevmapper.so $(so_name)
 	rm -rf bin
 	mkdir bin
 	for i in lvm $$(cat $(top_srcdir)/tools/.commands); do \
@@ -57,7 +60,9 @@ so_name = $(dmdir)/lib/ioctl/libdevmappe
 lvm-wrapper: Makefile
 	rm -f $ -t $@
 	echo '#!/bin/sh' >> $ -t
-	echo 'export LD_LIBRARY_PATH="$(dmdir)/lib/ioctl"' >> $ -t
+ifneq ("@DMDIR@", "")
+	echo 'export LD_LIBRARY_PATH="@DMDIR@/lib/ioctl"' >> $ -t
 	echo 'cmd=$$(echo ./$$0|sed "s,.*/,,")' >> $ -t
 	echo 'test "$$cmd" = lvm &&' >> $ -t
 	echo 'exec "$(abs_top_builddir)/tools/lvm"         "$$@"' >> $ -t

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]