[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: minimum perl version
From: |
Jim Meyering |
Subject: |
Re: minimum perl version |
Date: |
Sat, 04 Sep 2010 12:58:00 +0200 |
Bruno Haible wrote:
> Hi Jim,
>
>> diff --git a/tests/test-update-copyright.sh b/tests/test-update-copyright.sh
>> index 2d1022a..607928d 100755
>> --- a/tests/test-update-copyright.sh
>> +++ b/tests/test-update-copyright.sh
>> @@ -16,6 +16,10 @@
>> # You should have received a copy of the GNU General Public License
>> # along with this program. If not, see <http://www.gnu.org/licenses/>.
>>
>> +# Skip this test if Perl is too old. FIXME: 5.6.0 is just a guess.
>> +# We have a report that 5.004_05 is inadequate and that 5.8.8 works.
>> +perl -e 'require 5.6.0' || exit 77
>> +
>> diffout=`diff -u /dev/null /dev/null 2>&1`
>> if test x"$diffout" = x"" && test $? -eq 0; then
>> compare() { diff -u "$@"; }
>
> A little down in this test, there is a check whether perl exists at all.
> It makes no sense IMO to test the perl version, risking a message to stderr
> if it is missing, and then afterwards to test whether perl exists.
>
> Also, when the test is skipped, we should output an explanation why.
> This explanation has already uncovered bugs. A message like
> "Perl v5.8.0 required--this is only v5.6.0, stopped at -e line 1."
> sounds more like an error message than like an explanation why a test is
> being skipped.
>
> How about this proposed change?
...
>
> + # Skip this test if Perl is too old. FIXME: 5.8.0 is just a guess.
> + # We have a report that 5.6.1 is inadequate and that 5.8.0 works.
> + perl -e 'require 5.8.0' 2>/dev/null || {
> + echo '$0: skipping this test; Perl version is too old' 1>&2
> + exit 77
> + }
Hi Bruno,
Thanks. Moving the new test down is a definite improvement.
However, I'd prefer to continue to report the offending version of Perl
and the minimum required version. One way to do that would be
to not suppress stderr.
- [PATCH] tests: init.sh improvements for re-exec'ing with zsh, (continued)
- [PATCH] tests: init.sh improvements for re-exec'ing with zsh, Eric Blake, 2010/09/02
- Re: test-vc-cvs [was: IRIX failures], Tom G. Christensen, 2010/09/02
- Re: test-vc-cvs [was: IRIX failures], Eric Blake, 2010/09/02
- Re: test-vc-cvs [was: IRIX failures], Tom G. Christensen, 2010/09/02
- Re: test-vc-cvs [was: IRIX failures], Eric Blake, 2010/09/02
minimum perl version [was: IRIX failures], Eric Blake, 2010/09/01
Re: minimum perl version, Bruno Haible, 2010/09/04
Re: minimum perl version,
Jim Meyering <=
Re: minimum perl version, Bruno Haible, 2010/09/04
iswblank failure [was: IRIX failures], Eric Blake, 2010/09/01
[PATCH] strtod: work around IRIX 6.5 bug, Eric Blake, 2010/09/01