From 9b52ee154a413064b97db627af061e8cd3c98bd8 Mon Sep 17 00:00:00 2001 From: Kirill Elagin Date: Wed, 15 Apr 2020 13:52:23 +0300 Subject: [PATCH] Fix python tests on non-Linux * lang/python/tests/Makefile.am: Use platform-specific LD_LIBRARY_PATH variable name (slibpath_var from Libtool). * configure.ac: AC_SUBST shlibpath_var -- Python tests override the shared library path by setting LD_LIBRARY_PATH, however this variable can be different on different platforms (e.g. on Darwin it is DYLD_LIBRARY_PATH). Ask Libtool to provide the correct name for current platform. --- configure.ac | 2 ++ lang/python/tests/Makefile.am | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 009fe5b5..a09eac4a 100644 --- a/configure.ac +++ b/configure.ac @@ -107,6 +107,8 @@ AC_ARG_VAR(SYSROOT,[locate config scripts also below that directory]) # Enable GNU extensions on systems that have them. AC_GNU_SOURCE +AC_SUBST(shlibpath_var) + # Taken from mpfr-4.0.1, then modified for LDADD_FOR_TESTS_KLUDGE dnl Under Linux, make sure that the old dtags are used if LD_LIBRARY_PATH dnl is defined. The issue is that with the new dtags, LD_LIBRARY_PATH has diff --git a/lang/python/tests/Makefile.am b/lang/python/tests/Makefile.am index 026df03e..94843a0c 100644 --- a/lang/python/tests/Makefile.am +++ b/lang/python/tests/Makefile.am @@ -26,7 +26,7 @@ TESTS_ENVIRONMENT = GNUPGHOME=$(GNUPGHOME) \ LC_ALL=C GPG_AGENT_INFO= \ top_srcdir=$(top_srcdir) \ srcdir=$(srcdir) \ - LD_LIBRARY_PATH="../../../src/.libs:$(LD_LIBRARY_PATH)" + @shlibpath_var@="../../../src/.libs:$(@shlibpath_var@)" py_tests ?= t-wrapper.py \ t-callbacks.py \ -- 2.25.0