]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
build: fix 'installcheck' target
authorMathieu Lirzin <mthl@gnu.org>
Tue, 4 Feb 2020 14:28:00 +0000 (15:28 +0100)
committerMathieu Lirzin <mthl@gnu.org>
Mon, 10 Feb 2020 09:10:34 +0000 (10:10 +0100)
* t/local.mk (installcheck-testsuite): Do not use 'pre-inst-env' script.
(AM_TESTS_ENVIRONMENT): Ensure that installed perl modules are found.

t/local.mk

index 7e3a6196583e345933ff7204239566f9bd55e259..bd1615e3ce9954826af7a8cb6ce67475e6c1594d 100644 (file)
@@ -244,12 +244,22 @@ check-parallel:
 test_subdirs = %D% %D%/pm contrib/%D%
 include %D%/CheckListOfTests.am
 
-# Run the testsuite with the installed aclocal and automake.
+# Run the testsuite with the installed aclocal and automake without using
+# the 'pre-inst-env' wrapper script.
 installcheck-local: installcheck-testsuite
 installcheck-testsuite:
        $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
+         LOG_COMPILER=$(AM_TEST_RUNNER_SHELL) \
+         PL_LOG_COMPILER=$(PERL) \
          am_running_installcheck=yes
 
+# Ensure that the installed Automake perl modules are found when running 'installcheck' target
+AM_TESTS_ENVIRONMENT += \
+  if test "$${am_running_installcheck}" = yes; then \
+    PERL5LIB="$(DESTDIR)$(pkgvdatadir)/$${PERL5LIB:+$(PATH_SEPARATOR)}$$PERL5LIB"; \
+  fi; \
+  export PERL5LIB;
+
 # Performance tests.
 .PHONY: perf
 perf: all