Commit b3474802 authored by Niels Möller's avatar Niels Möller
Browse files

Rework setting of LD_LIBRARY_PATH for tests.

* testsuite/Makefile.in (check): Pass only TEST_SHLIB_DIR
to the run-tests script, and leave setting of LD_LIBRARY_PATH and
related variables to that script.
* examples/Makefile.in (check): Likewise.

* run-tests: Check TEST_SHLIB_DIR, and set up LD_LIBRARY_PATH and
related member variables.

* config.make.in (abs_top_builddir, TEST_SHLIB_DIR): New variables.
parent 12499814
2020-03-31 Niels Möller <nisse@lysator.liu.se>
* config.make.in (abs_top_builddir, TEST_SHLIB_DIR): New variables.
* run-tests: Check TEST_SHLIB_DIR, and set up LD_LIBRARY_PATH and
related member variables.
* testsuite/Makefile.in (check): Pass only TEST_SHLIB_DIR
to the run-tests script, and leave setting of LD_LIBRARY_PATH and
related variables to that script.
* examples/Makefile.in (check): Likewise.
2020-03-26 Niels Möller <nisse@lysator.liu.se> 2020-03-26 Niels Möller <nisse@lysator.liu.se>
* configure.ac: Bump package version to 3.6. * configure.ac: Bump package version to 3.6.
......
...@@ -64,6 +64,9 @@ bindir = @bindir@ ...@@ -64,6 +64,9 @@ bindir = @bindir@
libdir = @libdir@ libdir = @libdir@
includedir = @includedir@ includedir = @includedir@
infodir = @infodir@ infodir = @infodir@
abs_top_builddir = @abs_top_builddir@
TEST_SHLIB_DIR = "${abs_top_builddir}/.lib"
# PRE_CPPFLAGS and PRE_LDFLAGS lets each Makefile.in prepend its own # PRE_CPPFLAGS and PRE_LDFLAGS lets each Makefile.in prepend its own
# flags before CPPFLAGS and LDFLAGS. While EXTRA_CFLAGS are added at the end. # flags before CPPFLAGS and LDFLAGS. While EXTRA_CFLAGS are added at the end.
......
...@@ -113,9 +113,8 @@ hogweed-benchmark$(EXEEXT): $(HOGWEED_BENCH_OBJS) ...@@ -113,9 +113,8 @@ hogweed-benchmark$(EXEEXT): $(HOGWEED_BENCH_OBJS)
$(TARGETS) : io.$(OBJEXT) ../libnettle.stamp $(TARGETS) : io.$(OBJEXT) ../libnettle.stamp
$(HOGWEED_TARGETS): ../libhogweed.stamp $(HOGWEED_TARGETS): ../libhogweed.stamp
# The PATH update is for windows dlls, DYLD_LIBRARY_PATH is for OSX.
check: $(TS_ALL) check: $(TS_ALL)
LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" DYLD_LIBRARY_PATH=../.lib \ TEST_SHLIB_DIR="$(TEST_SHLIB_DIR)" \
srcdir="$(srcdir)" EMULATOR="$(EMULATOR)" EXEEXT="$(EXEEXT)" \ srcdir="$(srcdir)" EMULATOR="$(EMULATOR)" EXEEXT="$(EXEEXT)" \
"$(top_srcdir)"/run-tests $(TS_ALL) "$(top_srcdir)"/run-tests $(TS_ALL)
......
...@@ -28,6 +28,18 @@ fi ...@@ -28,6 +28,18 @@ fi
export srcdir export srcdir
if [ -n "$TEST_SHLIB_DIR" ] ; then
# Prepend to LD_LIBRARY_PATH, if it is alredy set.
LD_LIBRARY_PATH="${TEST_SHLIB_DIR}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
# For MACOS
DYLD_LIBRARY_PATH="$TEST_SHLIB_DIR"
# For Windows
PATH="${TEST_SHLIB_DIR}:${PATH}"
export LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH
export PATH
fi
# When used in make rules, we sometimes get the filenames VPATH # When used in make rules, we sometimes get the filenames VPATH
# expanded, but usually not. # expanded, but usually not.
find_program () { find_program () {
......
...@@ -139,9 +139,8 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \ ...@@ -139,9 +139,8 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \
# data. # data.
VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes @IF_ASM@ --partial-loads-ok=yes VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes @IF_ASM@ --partial-loads-ok=yes
# The PATH update is for windows dlls, DYLD_LIBRARY_PATH is for OSX.
check: $(TS_ALL) check: $(TS_ALL)
LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" DYLD_LIBRARY_PATH=../.lib \ TEST_SHLIB_DIR="$(TEST_SHLIB_DIR)" \
srcdir="$(srcdir)" \ srcdir="$(srcdir)" \
EMULATOR="$(EMULATOR)" NM="$(NM)" EXEEXT="$(EXEEXT)" \ EMULATOR="$(EMULATOR)" NM="$(NM)" EXEEXT="$(EXEEXT)" \
$(top_srcdir)/run-tests $(TS_ALL) $(top_srcdir)/run-tests $(TS_ALL)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment