[Libguestfs] [PATCH] Prepend local library path to LD_LIBRARY_PATH for tests, instead of replacing it
Richard W.M. Jones
rjones at redhat.com
Wed Jan 11 10:24:25 UTC 2012
On Tue, Jan 10, 2012 at 11:08:58PM +0100, Hilko Bengen wrote:
> Overwriting LD_LIBRARY_PATH broke some tests when running with fakeroot.
[...]
> diff --git a/align/Makefile.am b/align/Makefile.am
> index 1dc9221..4afb2e4 100644
> --- a/align/Makefile.am
> +++ b/align/Makefile.am
> @@ -72,7 +72,7 @@ stamp-virt-alignment-scan.pod: virt-alignment-scan.pod
>
> # TESTS_ENVIRONMENT = \
> # MALLOC_PERTURB_=$(random_val) \
> -# LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
> +# LD_LIBRARY_PATH=$(top_builddir)/src/.libs${if ${LD_LIBRARY_PATH},:${LD_LIBRARY_PATH},} \
> # LIBGUESTFS_PATH=$(top_builddir)/appliance \
> # TMPDIR=$(top_builddir)
The patch seems fine as it is, but I wonder if it's better to replace
these environment variables with a call to 'run', as in:
TESTS_ENVIRONMENT = \
MALLOC_PERTURB_=... \
$(top_builddir)/run
Note that run already does the right thing with LD_LIBRARY_PATH.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
More information about the Libguestfs
mailing list