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 _______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool