From ff001cbe5c7253a8825e5ad553f84b8d763013ac Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Sat, 30 May 2020 00:20:48 -0700 Subject: [PATCH] tests: Export CONFIG_HEADER to test scripts. Before this change, the testsuite/inplace-selinux test fails in some cases when SELinux is available. The reason it fails is because the require_selinux_ function in init.cfg expects the CONFIG_HEADER environment variable to be defined, but in fact it is not defined. Even though we do invoke AM_CONFIG_HEADER in configure.ac, and even though the CONFIG_HEADER variable does get set in the resulting Makefile, nothing actually exports the CONFIG_HEADER variable, so the test is doomed to fail whenever it is not skipped. Fix this by exporting the variable. * testsuite/local.mk (TESTS_ENVIRONMENT): Add CONFIG_HEADER to the list of variables to export to the environment of the test scripts. Reported by Vineet Jain in https://bugs.gnu.org/36150 . The fix was suggested by Timothy Sample in the same bug report. --- testsuite/local.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/testsuite/local.mk b/testsuite/local.mk index 2b3bf86..9dac4f3 100644 --- a/testsuite/local.mk +++ b/testsuite/local.mk @@ -161,6 +161,7 @@ TESTS_ENVIRONMENT = \ abs_top_builddir='$(abs_top_builddir)' \ abs_top_srcdir='$(abs_top_srcdir)' \ abs_srcdir='$(abs_srcdir)' \ + CONFIG_HEADER='$(CONFIG_HEADER)' \ built_programs=sed; \ srcdir='$(srcdir)' \ top_srcdir='$(top_srcdir)' \ -- 2.26.2