summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2017-02-17 11:38:23 +0300
committerGitHub <noreply@github.com>2017-02-17 11:38:23 +0300
commitf73e6ee687213d8f78a93a9519901d0fe314c228 (patch)
tree30e41a1b946ad8391f806be4cb85250b97732715 /Makefile.am
parent5c1be4f73082d09011661516c39fb53626d8bdc7 (diff)
parente53bcabb4b885ec998cc693e0788c3d68617bef2 (diff)
Merge pull request #5338 from mbiebl/fix-install-tests-target
Fix "make install-tests" when srcdir != builddir, fix valgrind-tests
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index c1f070fd17..dd10aabd36 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -152,7 +152,6 @@ endif
AM_TESTS_ENVIRONMENT = \
export SYSTEMD_KBD_MODEL_MAP=$(abs_top_srcdir)/src/locale/kbd-model-map; \
export SYSTEMD_LANGUAGE_FALLBACK_MAP=$(abs_top_srcdir)/src/locale/language-fallback-map; \
- export TEST_DIR=$(abs_top_srcdir)/test; \
export PATH=$(abs_top_builddir):$$PATH;
if ENABLE_BASH_COMPLETION
@@ -252,6 +251,8 @@ AM_CPPFLAGS = \
-I $(top_srcdir)/src/libsystemd/sd-device \
-I $(top_srcdir)/src/libsystemd/sd-id128 \
-I $(top_srcdir)/src/libsystemd-network \
+ -DABS_SRC_DIR=\"$(abs_top_srcdir)\" \
+ -DABS_BUILD_DIR=\"$(abs_top_builddir)\" \
$(OUR_CPPFLAGS)
AM_CFLAGS = $(OUR_CFLAGS)
@@ -6615,7 +6616,7 @@ valgrind-tests: $(TESTS)
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; \
+ $(AM_TESTS_ENVIRONMENT) $(LIBTOOL) --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
x="\n\n"; \
done
@@ -6716,14 +6717,14 @@ tests += \
.PHONY: install-tests
install-tests: $(tests) $(TEST_DATA_FILES)
for f in $(tests); do \
- if [ -x .libs/$$f ]; then \
- install -D -m 755 .libs/$$f $(DESTDIR)/$(testsdir)/$$f; \
+ if [ -x $(top_builddir)/.libs/$$f ]; then \
+ install -D -m 755 $(top_builddir)/.libs/$$f $(DESTDIR)/$(testsdir)/$$f; \
else \
- install -D -m 755 $$f $(DESTDIR)/$(testsdir)/$$f; \
+ install -D -m 755 $(top_builddir)/$$f $(DESTDIR)/$(testsdir)/$$f; \
fi; \
done
for f in $(TEST_DATA_FILES); do \
- install -D -m 644 $$f $(DESTDIR)/$(testsdir)/testdata/$${f#test/}; \
+ install -D -m 644 $(top_srcdir)/$$f $(DESTDIR)/$(testsdir)/testdata/$${f#test/}; \
done