From: Bruno Haible Date: Sat, 4 Sep 2010 11:58:02 +0000 (+0200) Subject: update-copyright test: Improve output when perl is missing or too old. X-Git-Tag: v0.1~3856 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=c82b481dd23acb58bf5352084b8d6551b91f756b;p=gnulib.git update-copyright test: Improve output when perl is missing or too old. * tests/test-update-copyright.sh: Move test of Perl version down after the test whether Perl exists. Provide an explanation relating Perl's error message to Automake's SKIP: message. --- diff --git a/ChangeLog b/ChangeLog index 8eb739206..e82e39f6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2010-09-04 Bruno Haible + update-copyright test: Improve output when perl is missing or too old. + * tests/test-update-copyright.sh: Move test of Perl version down after + the test whether Perl exists. Provide an explanation relating Perl's + error message to Automake's SKIP: message. + +2010-09-04 Bruno Haible + Don't augment PATH in TESTS_ENVIRONMENT. * modules/update-copyright-tests (Makefile.am): In TESTS_ENVIRONMENT, set abs_aux_dir instead of augmenting PATH. diff --git a/tests/test-update-copyright.sh b/tests/test-update-copyright.sh index 971f651f9..fbf4f23bb 100755 --- a/tests/test-update-copyright.sh +++ b/tests/test-update-copyright.sh @@ -16,10 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# 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' || exit 77 - diffout=`diff -u /dev/null /dev/null 2>&1` if test x"$diffout" = x"" && test $? -eq 0; then compare() { diff -u "$@"; } @@ -54,6 +50,13 @@ echo a > $TMP-in exit 77 } +# 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' || { + echo '$0: skipping this test; Perl version is too old' 1>&2 + exit 77 +} + # Do not let a different envvar setting perturb results. UPDATE_COPYRIGHT_MAX_LINE_LENGTH=72 export UPDATE_COPYRIGHT_MAX_LINE_LENGTH