[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make check and LD_LIBRARY_PATH
From: |
Christian Egli |
Subject: |
make check and LD_LIBRARY_PATH |
Date: |
Fri, 23 Mar 2012 12:40:21 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
Hi all
I co-maintain a project where we build a library, a bunch of auxiliary
tools based on that library and language bindings to this library. The
test suite runs a bunch of shell scripts and Python code (using the
bindings).
Now when running the test suite the shell scripts just invoke one of the
auxiliary tools and I added the following to Makefile.am in tests to
make sure the tool from the source is picked up:
TESTS_ENVIRONMENT = PATH=$(top_srcdir)/tools:$$PATH
For the Python based tests I have to make sure Python loads the newly
built library and not the one already installed on the system. So I
added the following to Makefile.am:
TESTS_ENVIRONMENT = \
LD_LIBRARY_PATH=$(top_srcdir)/liblouis/.libs:$$LD_LIBRARY_PATH \
PATH=$(top_srcdir)/tools:$$PATH
This solution seems to do the trick but it sure feels a bit hackish.
Especially since "the Internet" seems to say that I shouldn't use the
LD_LIBRARY_PATH.
A better solution seems to be to use libtool with --mode=execute. So I
guess I would have to write a wrapper script that invokes my Python
based tests as follows:
libtool --mode=execute -dlopen ../liblouis/liblouis.la -n python $(TEST_SCRIPT)
What is the drawback of just setting LD_LIBRARY_PATH in
TESTS_ENVIRONMENT?
Thanks
Christian
--
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland
- make check and LD_LIBRARY_PATH,
Christian Egli <=