automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1709


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1709-g61168e3
Date: Fri, 06 Jan 2012 17:37:42 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=61168e3c4c511e71ae8659388fe7ef8293222dbd

The branch, master has been updated
       via  61168e3c4c511e71ae8659388fe7ef8293222dbd (commit)
      from  dacb456ac6435c15c1ee230533129e05f7ab06bf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 61168e3c4c511e71ae8659388fe7ef8293222dbd
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jan 6 12:39:24 2012 +0100

    tests: skip tests on perl TAP driver if TAP::Parser is not available
    
    We had so far taken for granted that all the perl installations
    modern enough to correctly run automake also came with a built-in
    TAP::Parser module; unfortunately, testing on MinGW/MSYS has
    shown that this is not always true, and that a lot of spurious
    testsuite failures would take place in such a situation (see
    automake bug#10440).
    
    Luckily, the perl implementation of the Automake TAP driver is
    only meant to be used for prototyping and consistency checks, the
    "real" Automake TAP driver being the portable one implemented in
    awk.  So we can simply skip the affected tests on systems lacking
    TAP::Parser.
    
    * tests/defs (fetch_tap_driver): Skip the whole test case if
    the desired tap driver implementation is the perl one but the
    TAP::Parser module is unavailable.
    * tests/tap-bad-prog.tap: Adjust order of calls to `plan_' and
    `fetch_tap_driver', to ensure the test is not skipped after the
    TAP plan has been outputted (which would lead to a spurious
    error).
    * tests/tap-bad-signal.tap: Tweak to avoid the need to source the
    `tap-setup.sh' script, as that might cause a test skip too late,
    i.e., after a TAP plan has been already printed.
    * tests/tap-test-number-0.test: Do not force the test to skip
    when the tested TAP driver implementation is not the perl one.
    On the other hand, when it *is* the perl one, skip the test if
    the TAP::Parser module is unavailable.
    * tests/test-driver-cond.test: Skip the part of the test actually
    running "make check" if the TAP::Parser module is unavailable.
    * tests/get-sysconf.test: Also print the version of the
    `TAP::Parser' module, if available.
    
    Reported by Peter Rosin.

-----------------------------------------------------------------------

Summary of changes:
 tests/defs                   |   14 +++++++++-----
 tests/get-sysconf.test       |    6 +++++-
 tests/tap-bad-prog.tap       |    6 +++---
 tests/tap-signal.tap         |   15 +++++++++++++--
 tests/tap-test-number-0.test |   40 ++++++++++++++++++++++------------------
 tests/test-driver-cond.test  |    5 ++++-
 6 files changed, 56 insertions(+), 30 deletions(-)

diff --git a/tests/defs b/tests/defs
index 835788d..41ee262 100644
--- a/tests/defs
+++ b/tests/defs
@@ -1,8 +1,8 @@
 # -*- shell-script -*-
 #
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -602,12 +602,16 @@ fetch_tap_driver ()
   # TODO: with /bin/sh, for better coverage.
   case $am_tap_implementation in
     perl)
-      sed "1s|#!.*|#! $PERL -w|" "$am_scriptdir"/tap-driver.pl ;;
+      $PERL -MTAP::Parser -e 1 \
+        || skip_all_ "cannot import TAP::Parser perl module"
+      sed "1s|#!.*|#! $PERL -w|" "$am_scriptdir"/tap-driver.pl >tap-driver
+      ;;
     shell)
-      sed "1s|#!.*|#! $SHELL|" "$am_scriptdir"/tap-driver.sh ;;
+      sed "1s|#!.*|#! $SHELL|" "$am_scriptdir"/tap-driver.sh >tap-driver
+      ;;
     *)
       fatal_ "invalid \$am_tap_implementation '$am_tap_implementation'" ;;
-  esac > tap-driver \
+  esac \
     && chmod a+x tap-driver \
     || framework_failure_ "couldn't fetch $am_tap_implementation TAP driver"
   sed 10q tap-driver # For debugging.
diff --git a/tests/get-sysconf.test b/tests/get-sysconf.test
index 039a436..789a015 100755
--- a/tests/get-sysconf.test
+++ b/tests/get-sysconf.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,6 +37,10 @@ else
   ' "$top_testsrcdir"/ChangeLog || st=1
 fi
 $PERL -V || st=1
+# It's OK for the user not to have the TAP::Parser module; this can
+# happen with older perl installation, or on MinGW/MSYS.
+$PERL -e 'use TAP::Parser; print $TAP::Parser::VERSION, "\n"' || :
+
 cat "$top_testbuilddir/config.log" || st=1
 cat "$testbuilddir/aclocal-$APIVERSION" || st=1
 cat "$testbuilddir/automake-$APIVERSION" || st=1
diff --git a/tests/tap-bad-prog.tap b/tests/tap-bad-prog.tap
index a59a1dc..212633f 100755
--- a/tests/tap-bad-prog.tap
+++ b/tests/tap-bad-prog.tap
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,10 +21,10 @@
 am_parallel_tests=yes
 . ./defs || Exit 1
 
-plan_ 5
-
 fetch_tap_driver
 
+plan_ 5
+
 cat >> configure.in <<END
 AC_OUTPUT
 END
diff --git a/tests/tap-signal.tap b/tests/tap-signal.tap
index 0ed7194..f436bc8 100755
--- a/tests/tap-signal.tap
+++ b/tests/tap-signal.tap
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,9 +20,16 @@
 am_parallel_tests=yes
 . ./defs || Exit 1
 
+fetch_tap_driver
+
 plan_ 10
 
+cat >> configure.in <<END
+AC_OUTPUT
+END
+
 cat > Makefile.am << END
+TEST_LOG_DRIVER = \$(srcdir)/tap-driver
 TEST_LOG_COMPILER = $PERL -w
 ## Will be updated later.
 TESTS =
@@ -58,7 +65,11 @@ results_count=`ls *.test | wc -l | tr -d "$tab$sp"`
 
 chmod a+x *.test
 
-. "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
 
 signal_caught ()
 {
diff --git a/tests/tap-test-number-0.test b/tests/tap-test-number-0.test
index 8a117ce..6e77a5d 100755
--- a/tests/tap-test-number-0.test
+++ b/tests/tap-test-number-0.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,23 +21,27 @@
 am_parallel_tests=yes
 . ./defs || Exit 1
 
-if $PERL -w -e '
-  use warnings FATAL => "all"; use strict;
-  use TAP::Parser;
-  my $parser = TAP::Parser->new({tap => "1..1\n" . "ok 0\n"});
-  my $result = $parser->next;
-  $result->is_plan or die "first line is not TAP plan";
-  $result = $parser->next;
-  $result->is_test or die "second line is not TAP test result";
-  my $testno = $result->number;
-  $parser->next and die "unexpected further TAP stream";
-  exit ($testno == 0 ? 0 : 77);
-'; then
-  : # Nothing to do.
-elif test $? -eq 77; then
-  skip_ 'TAP::Parser bug: test number 0 gets relabelled as 1'
-else
-  fatal_ "error analyzing TAP::Parser module for bugs"
+if test $am_tap_implementation = perl; then
+  $PERL -MTAP::Parser -e 1 \
+    || skip_ "cannot import TAP::Parser perl module"
+  if $PERL -w -e '
+    use warnings FATAL => "all"; use strict;
+    use TAP::Parser;
+    my $parser = TAP::Parser->new({tap => "1..1\n" . "ok 0\n"});
+    my $result = $parser->next;
+    $result->is_plan or die "first line is not TAP plan";
+    $result = $parser->next;
+    $result->is_test or die "second line is not TAP test result";
+    my $testno = $result->number;
+    $parser->next and die "unexpected further TAP stream";
+    exit ($testno == 0 ? 0 : 77);
+  '; then
+    : # Nothing to do.
+  elif test $? -eq 77; then
+    skip_ 'TAP::Parser bug: test number 0 gets relabelled as 1'
+  else
+    fatal_ "error analyzing TAP::Parser module for bugs"
+  fi
 fi
 
 . "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
diff --git a/tests/test-driver-cond.test b/tests/test-driver-cond.test
index 3ed48a9..46986ff 100755
--- a/tests/test-driver-cond.test
+++ b/tests/test-driver-cond.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -87,6 +87,9 @@ grep '^my_LOG_DRIVER *=' Makefile.in \
 
 grep '^TEST_LOG_DRIVER =.*\$(SHELL).*/test-driver' Makefile.in
 
+$PERL -MTAP::Parser -e 1 \
+  || skip_ "cannot import TAP::Parser perl module"
+
 ./configure
 
 do_count ()


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]