automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-309-g


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-309-ge12be94
Date: Tue, 01 Feb 2011 11:51:13 +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=e12be9450726e26136a6bc64f7df47ced18f6671

The branch, maint has been updated
       via  e12be9450726e26136a6bc64f7df47ced18f6671 (commit)
      from  9095d6b98f6d9d3755e8b592f336011aef11d61f (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 e12be9450726e26136a6bc64f7df47ced18f6671
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jan 24 15:56:52 2011 +0100

    coverage: more tests on simple and parallel test drivers
    
    * tests/parallel-tests-subdir.test: New test.
    * tests/check-exported-srcdir.test: Likewise.
    * tests/check-tests-in-builddir.test: Likewise.
    * tests/check-tests_environment.test: Likewise.
    * tests/Makefile.am (TESTS): Update.

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

Summary of changes:
 ChangeLog                                          |    9 ++
 tests/Makefile.am                                  |    4 +
 tests/Makefile.in                                  |    7 ++
 ...t-stamp-vti.test => check-exported-srcdir.test} |   55 +++++++------
 tests/check-tests-in-builddir.test                 |   81 ++++++++++++++++++++
 .../{check11.test => check-tests_environment.test} |   22 ++---
 tests/{check6.test => parallel-tests-subdir.test}  |   33 ++++-----
 7 files changed, 155 insertions(+), 56 deletions(-)
 copy tests/{autodist-stamp-vti.test => check-exported-srcdir.test} (56%)
 create mode 100755 tests/check-tests-in-builddir.test
 copy tests/{check11.test => check-tests_environment.test} (70%)
 copy tests/{check6.test => parallel-tests-subdir.test} (66%)

diff --git a/ChangeLog b/ChangeLog
index dd96e23..31bdd66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-02-01  Stefano Lattarini  <address@hidden>
+
+       coverage: more tests on simple and parallel test drivers
+       * tests/parallel-tests-subdir.test: New test.
+       * tests/check-exported-srcdir.test: Likewise.
+       * tests/check-tests-in-builddir.test: Likewise.
+       * tests/check-tests_environment.test: Likewise.
+       * tests/Makefile.am (TESTS): Update.
+
 2011-01-29  Stefano Lattarini  <address@hidden>
 
        tests: fix spurious failures in lflags*.test
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 78bacf2..c9f8467 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -141,6 +141,9 @@ check8.test \
 check9.test \
 check10.test \
 check11.test \
+check-exported-srcdir.test \
+check-tests-in-builddir.test \
+check-tests_environment.test \
 checkall.test \
 clean.test \
 clean2.test \
@@ -568,6 +571,7 @@ parallel-tests8.test \
 parallel-tests9.test \
 parallel-tests10.test \
 parallel-tests-unreadable-log.test \
+parallel-tests-subdir.test \
 parse.test \
 percent.test \
 percent2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 18cb337..1370461 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -280,6 +280,9 @@ gcj6.test \
 txinfo5.test
 
 parallel_tests = \
+check-exported-srcdir-p.test \
+check-tests-in-builddir-p.test \
+check-tests_environment-p.test \
 check-p.test \
 check10-p.test \
 check11-p.test \
@@ -408,6 +411,9 @@ check8.test \
 check9.test \
 check10.test \
 check11.test \
+check-exported-srcdir.test \
+check-tests-in-builddir.test \
+check-tests_environment.test \
 checkall.test \
 clean.test \
 clean2.test \
@@ -835,6 +841,7 @@ parallel-tests8.test \
 parallel-tests9.test \
 parallel-tests10.test \
 parallel-tests-unreadable-log.test \
+parallel-tests-subdir.test \
 parse.test \
 percent.test \
 percent2.test \
diff --git a/tests/autodist-stamp-vti.test b/tests/check-exported-srcdir.test
similarity index 56%
copy from tests/autodist-stamp-vti.test
copy to tests/check-exported-srcdir.test
index 4f37e14..9209fc8 100755
--- a/tests/autodist-stamp-vti.test
+++ b/tests/check-exported-srcdir.test
@@ -14,47 +14,52 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Check that `stamp-vti' is automatically distributed when info_TEXINFOS
-# and version.texi are involved.
-# Related to automake bug#7819.
+# Check that the "Simple Tests" driver (either with or without the
+# parallel-tests option enabled) exports the `srcdir' value in the
+# environment of the tests.  This is documented in the manual.
 
-required=makeinfo
 . ./defs || Exit 1
 
 set -e
 
-cat >> configure.in << END
+show_info ()
+{
+  if test x"$parallel_tests" = x"yes"; then
+     cat foo.log
+     cat test-suite.log
+  else
+     :
+  fi
+}
+
+mkdir SrcDir BuildDir
+
+mv [a-z]* SrcDir
+cd SrcDir
+
+cat >> configure.in << 'END'
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-info_TEXINFOS = foo.texi
-.PHONY: test
-test: all distdir
-       ls -l $(distdir)
-       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]stamp-vti '
-       test -f $(distdir)/stamp-vti
+TESTS = foo.test
 END
 
-cat > foo.texi << 'END'
-\input texinfo
address@hidden foo.info
address@hidden Zardoz
address@hidden Top
address@hidden version.texi
-bar baz quux
address@hidden
+cat > foo.test <<'END'
+#!/bin/sh
+echo "foo.test: srcdir='$srcdir'"
+test x"$srcdir" = x"../SrcDir"
 END
-
-# Required when using Texinfo.
-: > texinfo.tex
-cp "$testsrcdir/../lib/mdate-sh" .
+chmod a+x foo.test
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure
-$MAKE test
+cd ../BuildDir
+../SrcDir/configure
+
+$MAKE check || { show_info; Exit 1; }
+show_info
 
 :
diff --git a/tests/check-tests-in-builddir.test 
b/tests/check-tests-in-builddir.test
new file mode 100755
index 0000000..b30999b
--- /dev/null
+++ b/tests/check-tests-in-builddir.test
@@ -0,0 +1,81 @@
+#! /bin/sh
+# Copyright (C) 2011 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the "Simple Tests" driver can find test in the srcdir as
+# well as in builddir, and that is prefers those in the builddir.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS = foo.test bar.test
+EXTRA_DIST = $(TESTS)
+END
+
+cat > foo.test << 'END'
+#! /bin/sh
+exit ${FOO_EXIT_STATUS-0}
+END
+chmod a+x foo.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+mkdir build
+cd build
+
+../configure
+
+cat > bar.test << 'END'
+#! /bin/sh
+exit 0
+END
+chmod a+x bar.test
+
+$MAKE check >out 2>&1 || { cat out; Exit1; }
+cat out
+grep '\.\./foo' out && Exit 1
+grep '^PASS: foo.test *$' out
+grep '^PASS: bar.test *$' out
+
+rm -f test-suite.log foo.log bar.log
+
+FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 && { cat out; Exit1; }
+cat out
+grep '\.\./foo' out && Exit 1
+grep '^FAIL: foo.test *$' out
+grep '^PASS: bar.test *$' out
+
+rm -f test-suite.log foo.log bar.log
+
+# Check that if the same test is present in srcdir and builddir,
+# the one in builddir is preferred.
+cp bar.test foo.test
+FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 || { cat out; Exit1; }
+cat out
+grep '^PASS: foo.test *$' out
+grep '^PASS: bar.test *$' out
+
+# The tests in the builddir must be preferred also by "make dist".
+FOO_EXIT_STATUS=1 $MAKE distcheck
+
+:
diff --git a/tests/check11.test b/tests/check-tests_environment.test
similarity index 70%
copy from tests/check11.test
copy to tests/check-tests_environment.test
index 1fe6a4d..a07ab95 100755
--- a/tests/check11.test
+++ b/tests/check-tests_environment.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009, 2010  Free Software Foundation, Inc.
+# Copyright (C) 2011 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
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Check skip summary.
+# "Simple Tests" testsuite driver: check TESTS_ENVIRONMENT support.
 
 . ./defs || Exit 1
 
@@ -25,27 +25,23 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TESTS = skip skip2
+TESTS = foo.test
+EXTRA_DIST = $(TESTS)
 END
 
-cat >>skip <<'END'
+cat > foo.test << 'END'
 #! /bin/sh
-exit 77
+test x"$FOO" = x"ok"
 END
-chmod a+x skip
-cp skip skip2
+chmod a+x foo.test
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
-env TESTS=skip $MAKE -e check >stdout
-cat stdout
-grep '1.*passed' stdout && Exit 1
 
-env TESTS="skip skip2" $MAKE -e check >stdout
-cat stdout
-grep '2.*passed' stdout && Exit 1
+FOO=bad TESTS_ENVIRONMENT='FOO=ok'  $MAKE check
+FOO=ok  TESTS_ENVIRONMENT='FOO=bad' $MAKE check && Exit 1
 
 :
diff --git a/tests/check6.test b/tests/parallel-tests-subdir.test
similarity index 66%
copy from tests/check6.test
copy to tests/parallel-tests-subdir.test
index e32499c..18695fe 100755
--- a/tests/check6.test
+++ b/tests/parallel-tests-subdir.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2011 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
@@ -14,41 +14,38 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test for PR 400: XFAIL_TESTS delimited by TABs.
-# Also test that Solaris make VPATH rewriting is honored
+# Check that the parallel-tests driver creates parent directories for
+# the log files when needed.
 
+parallel_tests=yes
 . ./defs || Exit 1
 
 set -e
 
 cat >> configure.in << 'END'
-AC_PROG_CC
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TESTS = $(XFAIL_TESTS)
-XFAIL_TESTS = a        b       c
+TESTS = dir1/foo.test dir2/dir3/foo.test
+TEST_LOG_COMPILER = sh
 END
 
-cat >>a <<'END'
-#! /bin/sh
-exit 1
-END
-
-cp a b
-cp a c
-
-chmod a+x a b c
+mkdir dir1 dir2 dir2/dir3
+echo : > dir1/foo.test
+echo : > dir2/dir3/foo.test
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure
-$MAKE check
-$MAKE distclean
 mkdir build
 cd build
 ../configure
 $MAKE check
+find . # For debugging.
+test -f test-suite.log
+test -f dir1/foo.log
+test -f dir2/dir3/foo.log
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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