[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: perl tests not using correct $PATH
From: |
Jim Meyering |
Subject: |
Re: perl tests not using correct $PATH |
Date: |
Fri, 14 Sep 2012 19:18:16 +0200 |
Pádraig Brady wrote:
> On 09/14/2012 04:54 PM, Jim Meyering wrote:
>> Pádraig Brady wrote:
>>> I just did this and noticed that seq from
>>> my system rather than the just build seq was used.
>>>
>>> make check TESTS=tests/misc/seq.pl SUBDIRS=.
>>>
>>> I'll look later tonight, but someone might
>>> know off the top of their heads what the issue is.
>>
>> Hi Pádraig,
>>
>> Thanks for testing and reporting that.
>> However, so far, I cannot reproduce the problem:
>>
>> $ make check TESTS=tests/misc/seq.pl SUBDIRS=.&& head -1
>> tests/misc/seq.log
>> seq (GNU coreutils) 8.19.130-f1f7f
>>
>> while the one early in my path is 8.15:
>>
>> $ seq --version|head -1
>> seq (GNU coreutils) 8.15
>>
>
> Ah OK. I was using the latest built automake
> for my platform: automake-1.11.3-1.fc17.noarch
> There is a bug logged to update to 1.11.6 to fix the CVE.
> That req in bootstrap.conf is for 1.11.2
That's the error.
1.11.3 is inadequate, since we're using AM_TESTS_ENVIRONMENT,
and 1.11.3 has this code in am/check.am:
$ grep -C3 'TESTS_ENV.*)$' /usr/share/automake-1.11/am/check.am
elif test -f "$$f"; then dir=; \
else dir="$(srcdir)/"; fi; \
tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM; \
$(TESTS_ENVIRONMENT)
# To be appended to the command running the test. Handle the stdout
# and stderr redirection, and catch the exit status.
AFAICS, AM_TESTS_ENVIRONMENT is not supported on the 1.11 branch at all,
so its use would require 1.12 or newer.
Hence, this fix should solve it:
diff --git a/tests/local.mk b/tests/local.mk
index 41a214f..0b6d576 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -52,7 +52,7 @@ TEST_SUITE_LOG = tests/test-suite.log
# variables that can perturb tests are unset or set to expected values.
# The rest are envvar settings that propagate build-related Makefile
# variables to test scripts.
-AM_TESTS_ENVIRONMENT = \
+TESTS_ENVIRONMENT = \
. $(srcdir)/tests/lang-default; \
tmp__=$${TMPDIR-/tmp}; \
test -d "$$tmp__" && test -w "$$tmp__" || tmp__=.; \
Re: perl tests not using correct $PATH, Jim Meyering, 2012/09/14