# -*- 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
# 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.
#! /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
' "$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
#! /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
am_parallel_tests=yes
. ./defs || Exit 1
-plan_ 5
-
fetch_tap_driver
+plan_ 5
+
cat >> configure.in <<END
AC_OUTPUT
END
#! /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
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 =
chmod a+x *.test
-. "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
signal_caught ()
{
#! /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
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"
#! /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
grep '^TEST_LOG_DRIVER =.*\$(SHELL).*/test-driver' Makefile.in
+$PERL -MTAP::Parser -e 1 \
+ || skip_ "cannot import TAP::Parser perl module"
+
./configure
do_count ()