summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
-rw-r--r--test/test-functions9
2 files changed, 9 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 0ec407520b..f71ce848ee 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4861,7 +4861,7 @@ test_keymap_util_SOURCES = \
src/locale/keymap-util.h
test_keymap_util_LDADD = \
- libshared.la \
+ libsystemd-shared.la \
-ldl
tests += \
@@ -6417,7 +6417,7 @@ install-tree: all
.PHONY: valgrind-tests
valgrind-tests: $(TESTS)
$(AM_V_GEN)for f in $(filter-out %.pl %.py, $^); do \
- if file $$f | grep -q shell; then \
+ if $(LIBTOOL) --mode=execute file $$f | grep -q shell; then \
echo -e "$${x}Skipping non-binary $$f"; else \
echo -e "$${x}Running $$f"; \
$(LIBTOOL) --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
diff --git a/test/test-functions b/test/test-functions
index 4583c02f97..567a000b8d 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -275,10 +275,15 @@ install_systemd() {
echo LogLevel=debug >> $initdir/etc/systemd/system.conf
}
+get_ldpath() {
+ local _bin="$1"
+ objdump -p "$_bin" 2>/dev/null | awk "/R(UN)?PATH/ { print \"$initdir\" \$2 }" | paste -sd :
+}
+
install_missing_libraries() {
# install possible missing libraries
- for i in $initdir/{sbin,bin}/* $initdir/lib/systemd/*; do
- inst_libs $i
+ for i in $initdir{,/usr}/{sbin,bin}/* $initdir{,/usr}/lib/systemd/*; do
+ LD_LIBRARY_PATH=$(get_ldpath $i) inst_libs $i
done
}