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-655-g


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-655-g3d6197f
Date: Mon, 16 Jan 2012 17:38:25 +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=3d6197fe647445ecbcfaac6c004449246471d5b6

The branch, maint has been updated
       via  3d6197fe647445ecbcfaac6c004449246471d5b6 (commit)
       via  8fec2399264ee4822ecf2c0d9275d890edbc8e50 (commit)
       via  d9a7182ed15654aebdd049857282106e84962813 (commit)
       via  20f2ac90d14d04caef07c6e445e7b3e582374701 (commit)
       via  20d99e05c9286ded040131e89c0c90a70334ed05 (commit)
      from  12dc0ec5e3c7e1a12569d5cfdbb8ceaa5a5f5f58 (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 3d6197fe647445ecbcfaac6c004449246471d5b6
Merge: 12dc0ec 8fec239
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jan 16 18:35:50 2012 +0100

    Merge branch 'check-html-deprecate' into maint
    
    * check-html-deprecate:
      recheck: fix interaction with "make -n"
      recheck: behave better with non-GNU make
      check: separate .log -> .html conversion from core testsuite harness
      docs: deprecate .log -> .html conversion by parallel-tests

commit 8fec2399264ee4822ecf2c0d9275d890edbc8e50
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jan 13 22:39:47 2012 +0100

    recheck: fix interaction with "make -n"
    
    * lib/am/check.am (recheck): Ensure the recipe does not erroneously
    remove '.log' files when running under "make -n".  For the sake of
    NetBSD make, this also means that ...
    (.MAKE): ... this cannot depend on 'recheck' anymore.
    * tests/parallel-tests-dryrun.test: New test.
    * tests/list-of-tests.mk: Add it.

commit d9a7182ed15654aebdd049857282106e84962813
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jan 13 18:53:43 2012 +0100

    recheck: behave better with non-GNU make
    
    * automake.in (handle_tests): Also substitute '%CHECK_DEPS%' with
    the value of the '@check' array, containing the list of early
    test dependencies like '$(check_SCRIPTS)', $(check_PROGRAMS)',
    etc.
    * lib/am/check.am (recheck): Explicitly depend on '%CHECK_DEPS%'.
    (check, recheck): Unify the implementation of their recipes, with
    different code paths taken depending on the name of the target.
    This makes the implementation of "recheck" less brittle in the
    process (especially when non-GNU make and AM_MAKEFLAGS overriding
    are involved).
    * lib/am/check-html.am (check-html, recheck-html): Likewise.
    * tests/check.test: Adjust to avoid spurious failure.
    * tests/parallel-tests2.test: Improve coverage.

commit 20f2ac90d14d04caef07c6e445e7b3e582374701
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jan 13 17:56:13 2012 +0100

    check: separate .log -> .html conversion from core testsuite harness
    
    That feature is to be deprecated in the 1.11.x series, and removed
    from the automake core in the 1.12 release, where it will instead
    be offered in a semi-independent extra '*.am' fragment.  So let's
    start better separating the .log -> .html conversion from the "core
    code" of the parallel-tests harness.
    
    Reference:
      <http://lists.gnu.org/archive/html/automake/2012-01/msg00005.html>
    
    * lib/am/check.am (.log.html, check-html, recheck-html): Move these
    targets ...
    * automake.in (handle_tests): ... and the initialization of the
    TEST_SUITE_HTML variable and the cleaning of the $(TEST_SUITE_HTML)
    file ...
    * lib/am/check-html.am: ... in this new file, with related (minor)
    refactorings, enhancements and simplifications.
    * lib/am/check.am (.MAKE. PHONY, AM_RECURSIVE_TARGETS): Adjust.
    * lib/am/Makefile.am (dist_am_DATA): Add 'check-html.am'.
    * tests/parallel-tests2.test: Improve coverage.

commit 20d99e05c9286ded040131e89c0c90a70334ed05
Author: Stefano Lattarini <address@hidden>
Date:   Sun Jan 8 19:26:18 2012 +0100

    docs: deprecate .log -> .html conversion by parallel-tests
    
    That feature is to be deprecated in the 1.11.x series, and
    removed in the 1.12 release.
    
    Reference:
      <http://lists.gnu.org/archive/html/automake/2012-01/msg00005.html>
    
    * doc/automake.texi (Simple Tests using parallel-tests): Deprecate
    the '.log' -> '.html' conversion and the targets 'check-html' and
    'recheck-html'.  Related rewording and reformatting.
    * NEWS (Future backward-incompatibilities): Update.

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

Summary of changes:
 NEWS                             |    4 ++
 automake.in                      |    6 +-
 doc/automake.texi                |   38 ++++++--------
 lib/am/Makefile.am               |    3 +-
 lib/am/check-html.am             |   61 ++++++++++++++++++++++
 lib/am/check.am                  |  103 ++++++++++++++------------------------
 tests/check.test                 |    4 +-
 tests/list-of-tests.mk           |    1 +
 tests/parallel-tests-dryrun.test |   93 ++++++++++++++++++++++++++++++++++
 tests/parallel-tests2.test       |   35 +++++++++++++
 10 files changed, 255 insertions(+), 93 deletions(-)
 create mode 100644 lib/am/check-html.am
 create mode 100755 tests/parallel-tests-dryrun.test

diff --git a/NEWS b/NEWS
index bd334fd..172889c 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ New in 1.11.0a:
 
 * WARNING: Future backward-incompatibilities!
 
+  - The support for ".log -> .html" conversion and the check-html and
+    recheck-html targets will be removed in the next major Automake
+    release (1.12).
+
   - The `lzma' compression format for distribution archives has been
     deprecated in favor of `xz' and `lzip', and will be removed in the
     next major Automake release (1.12).
diff --git a/automake.in b/automake.in
index 50a9d87..24d5872 100644
--- a/automake.in
+++ b/automake.in
@@ -4958,9 +4958,11 @@ sub handle_tests
   if (var ('TESTS'))
     {
       push (@check_tests, 'check-TESTS');
+      my $check_deps = "@check";
       $output_rules .= &file_contents ('check', new Automake::Location,
                                       COLOR => !! option 'color-tests',
-                                      PARALLEL_TESTS => !! option 
'parallel-tests');
+                                      PARALLEL_TESTS => !! option 
'parallel-tests',
+                                       CHECK_DEPS => $check_deps);
 
       # Tests that are known programs should have $(EXEEXT) appended.
       # For matching purposes, we need to adjust XFAIL_TESTS as well.
@@ -4971,7 +4973,6 @@ sub handle_tests
       if (option 'parallel-tests')
         {
          define_variable ('TEST_SUITE_LOG', 'test-suite.log', INTERNAL);
-         define_variable ('TEST_SUITE_HTML', '$(TEST_SUITE_LOG:.log=.html)', 
INTERNAL);
          my $suff = '.test';
          my $at_exeext = '';
          my $handle_exeext = exists $configure_vars{'EXEEXT'};
@@ -5087,7 +5088,6 @@ sub handle_tests
          $clean_files{'$(TEST_LOGS_TMP)'} = MOSTLY_CLEAN;
          $clean_files{'$(TEST_LOGS)'} = MOSTLY_CLEAN;
          $clean_files{'$(TEST_SUITE_LOG)'} = MOSTLY_CLEAN;
-         $clean_files{'$(TEST_SUITE_HTML)'} = MOSTLY_CLEAN;
        }
     }
 }
diff --git a/doc/automake.texi b/doc/automake.texi
index 0c4dc01..cb31053 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -8829,17 +8829,17 @@ by the tests, not the tests themselves.  Of course you 
can set
 @section Simple Tests using @samp{parallel-tests}
 @cindex @option{parallel-tests}, Using
 
-The option @option{parallel-tests} (@pxref{Options}) enables a test
-suite driver that is mostly compatible to the simple test driver described
-in the previous section, but provides a few more features and slightly 
different
-semantics.  It features concurrent execution of tests with @code{make -j},
-allows to specify inter-test dependencies, lazy reruns of tests that
-have not completed in a prior run, summary and verbose output in
address@hidden (reStructuredText) and @samp{HTML} format, and hard errors
-for exceptional failures.  Similar to the simple test driver,
address@hidden, @code{AM_COLOR_TESTS}, @code{XFAIL_TESTS}, and
-the @code{check_*} variables are honored, and the environment variable
address@hidden is set during test execution.
+The option @option{parallel-tests} (@pxref{Options}) enables a test suite
+driver that is mostly compatible to the simple test driver described in
+the previous section, but provides a few more features and slightly
+different semantics.  It features concurrent execution of tests with
address@hidden -j} and automatic collection of the test scripts output and
+summary thereof in @file{.log} files, and allows to specify inter-test
+dependencies, lazy reruns of tests that have not completed in a prior
+run, and hard errors for exceptional failures.  Similar to the simple
+test driver, @code{TESTS_ENVIRONMENT}, @code{AM_COLOR_TESTS},
address@hidden, and the @code{check_*} variables are honored,
+and the environment variable @env{srcdir} is set during test execution.
 
 This test driver is still experimental and may undergo changes in order
 to satisfy additional portability requirements.
@@ -8918,16 +8918,13 @@ intermingled output.  The output from failed tests is 
collected in the
 file is output after the summary.  For best results, the tests should be
 verbose by default now.
 
address@hidden mostlyclean
 @trindex check-html
 @vindex RST2HTML
 @vindex TEST_SUITE_HTML
-With @code{make check-html}, the log files may be converted from RST
-(reStructuredText, see @uref{http://docutils.sourceforge.net/@/rst.html})
-to HTML using @samp{RST2HTML}, which defaults to @command{rst2html} or
address@hidden  The variable @samp{TEST_SUITE_HTML} contains the
-set of converted log files.  The log and HTML files are removed upon
address@hidden mostlyclean}.
+Previous versions of automake used to provide a @code{check-html} target
+to convert the log files to HTML.  This feature is now deprecated, and
address@hidden be removed} in the next major Automake release, so don't rely
+on it anymore.
 
 @vindex DISABLE_HARD_ERRORS
 @cindex Exit status 99, special interpretation
@@ -9002,13 +8999,10 @@ env RECHECK_LOGS= make -e check
 
 @item
 @trindex recheck
address@hidden recheck-html
 You can ensure that all tests are rerun which have failed or passed
 unexpectedly, by running @code{make recheck} in the test directory.
 This convenience target will set @code{RECHECK_LOGS} appropriately
-before invoking the main test driver.  The @code{recheck-html} target
-does the same as @code{recheck} but again converts the resulting log
-file in HTML format, like the @code{check-html} target.
+before invoking the main test driver.
 @end itemize
 
 In order to guarantee an ordering between tests even with @code{make
diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am
index a255f70..7b37989 100644
--- a/lib/am/Makefile.am
+++ b/lib/am/Makefile.am
@@ -3,7 +3,7 @@
 ## Makefile for Automake lib/am.
 
 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004, 2008,
-# 2009  Free Software Foundation, Inc.
+# 2009, 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
@@ -23,6 +23,7 @@ amdir = $(pkgvdatadir)/am
 dist_am_DATA = \
 ansi2knr.am \
 check.am \
+check-html.am \
 check2.am \
 clean-hdr.am \
 clean.am \
diff --git a/lib/am/check-html.am b/lib/am/check-html.am
new file mode 100644
index 0000000..13f0a47
--- /dev/null
+++ b/lib/am/check-html.am
@@ -0,0 +1,61 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 2001, 2003, 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
+## 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/>.
+
+## Makefile.am fragment to produce HTML output from RST-formatted
+## log files produced by the parallel-tests output.
+## This fragment was part of the automake core in the 1.11.x release
+## series, but is to be moved out in the 1.12 release.
+
+TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
+
+mostlyclean-am: am--mostlyclean-test-html
+.PHONY: am--mostlyclean-test-html
+am--mostlyclean-test-html:
+## Expand $(TEST_LOGS) only once, to avoid exceeding line length limits.
+       list='$(TEST_LOGS:.log=.html)'; test -z "$$list" || rm -f $$list
+       rm -f $(TEST_SUITE_HTML)
+
+.log.html:
+       @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py';            \
+       for r2h in $$list; do                                           \
+         if ($$r2h --version) >/dev/null 2>&1; then                    \
+           R2H=$$r2h;                                                  \
+         fi;                                                           \
+       done;                                                           \
+       if test -z "$$R2H"; then                                        \
+         echo >&2 "cannot find rst2html, cannot create $@";            \
+         exit 2;                                                       \
+       fi;                                                             \
+       $$R2H $< >address@hidden
+       @mv address@hidden $@
+
+# Be sure to run check first, and then to convert the result.
+# Beware of concurrent executions.  Run "check" not "check-TESTS", as
+# check-SCRIPTS and other dependencies are rebuilt by the former only.
+# And expect check to fail.
+check-html recheck-html:
+       @target=`echo $@ | sed 's/-html$$//'`; \
+       rv=0; $(MAKE) $(AM_MAKEFLAGS) $$target || rv=$$?; \
+## The nullification of $(TEST_LOGS) is required to ensure that
+## "make recheck-html" do not try to uselessly re-run tests.
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) TEST_LOGS= || exit 4; \
+       exit $$rv
+
+AM_RECURSIVE_TARGETS += check-html recheck-html
+
+.PHONY: check-html recheck-html
+.MAKE: check-html recheck-html
diff --git a/lib/am/check.am b/lib/am/check.am
index 29faa38..e0a453b 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2003, 2006, 2007, 2008, 2009, 2010, 2011 Free
-## Software Foundation, Inc.
+## Copyright (C) 2001, 2003, 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
@@ -233,15 +233,18 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
 
 RECHECK_LOGS = $(TEST_LOGS)
 
-# Run all the tests.
-check-TESTS:
+check-TESTS recheck:
+## If we are running "make recheck", it's not the user which can decide
+## which tests to consider for re-execution, so we must ignore the value
+## of $(RECHECK_LOGS).
+       @if test $@ != recheck; then \
 ## Expand $(RECHECK_LOGS) only once, to avoid exceeding line length limits.
-       @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+          list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list; \
+        fi
 ## We always have to remove TEST_SUITE_LOG, to ensure its rule is run
 ## in any case even in lazy mode: otherwise, if no test needs rerunning,
-## or a prior run plus reruns all happen within the same timestamp
-## (can happen with a prior `make TESTS=<subset>'),
-## then we get no log output.
+## or a prior run plus reruns all happen within the same timestamp (can
+## happen with a prior `make TESTS=<subset>'), then we get no log output.
 ## OTOH, this means that, in the rule for `$(TEST_SUITE_LOG)', we
 ## cannot use `$?' to compute the set of lazily rerun tests, lest
 ## we rely on .PHONY to work portably.
@@ -251,59 +254,13 @@ check-TESTS:
 ## 3.80 to erroneously expand $(TESTS_LOGS) to `foo.log .log'.
 ## Work around this bug.
          test .log = $$f && continue; \
-## Be careful to avoid extra whitespace in the definition of $list.  See
-## comments in `recheck' below for why this might be useful.
-         if test -z "$$list"; then list=$$f; else list="$$list $$f"; fi; \
-       done; \
-       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
-
-AM_RECURSIVE_TARGETS += check
-
-## -------------- ##
-## Produce HTML.  ##
-## -------------- ##
-
-.log.html:
-       @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py';            \
-       for r2h in $$list; do                                           \
-         if ($$r2h --version) >/dev/null 2>&1; then                    \
-           R2H=$$r2h;                                                  \
-         fi;                                                           \
-       done;                                                           \
-       if test -z "$$R2H"; then                                        \
-         echo >&2 "cannot find rst2html, cannot create $@";            \
-         exit 2;                                                       \
-       fi;                                                             \
-       $$R2H $< >address@hidden
-       @mv address@hidden $@
-
-# Be sure to run check first, and then to convert the result.
-# Beware of concurrent executions.  Run "check" not "check-TESTS", as
-# check-SCRIPTS and other dependencies are rebuilt by the former only.
-# And expect check to fail.
-check-html:
-       @if $(MAKE) $(AM_MAKEFLAGS) check; then                 \
-         rv=0; else rv=$$?;                                    \
-       fi;                                                     \
-       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4;   \
-       exit $$rv
-
-.PHONY: check-html
-.MAKE: check-html
-
-AM_RECURSIVE_TARGETS += check-html
-
-## -------------------- ##
-## Rechecking failures. ##
-## -------------------- ##
-
-## Rerun all FAILed or XPASSed tests.
-recheck recheck-html:
-       @target=`echo $@ | sed 's,^re,,'`; \
-       list='' list2='$(TEST_LOGS)'; for f in $$list2; do \
-         test -f $$f || continue; \
-         if test -r $$f && read line < $$f; then \
-           case $$line in FAIL*|XPASS*) : ;; *) continue;; esac; \
+## If running a "make recheck", we must only consider tests that had
+## an unexpected outcome (FAIL or XPASS) in the earlier run.
+         if test $@ = recheck; then \
+           test -f $$f || continue; \
+           if test -r $$f && read line < $$f; then \
+             case $$line in FAIL*|XPASS*) : ;; *) continue;; esac; \
+           fi; \
          fi; \
 ## Be careful to avoid extra whitespace in the definition of $list, since
 ## its value will be passed to the recursive make invocation below through
@@ -313,12 +270,28 @@ recheck recheck-html:
 ## <http://lists.gnu.org/archive/html/bug-automake/2010-08/msg00004.html>
          if test -z "$$list"; then list=$$f; else list="$$list $$f"; fi; \
        done; \
-       $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) 
TEST_LOGS="'"$$list"'"'
+## Under "make recheck", remove the logs of the files to recheck, so that
+## those will be rerun by the "make test-suite.log" recursive invocation
+## below.  But use a proper hack to avoid extra files removal when running
+## under "make -n".
+       if test $@ = recheck && test -n "$$list"; then \
+         echo "am--clean: ; rm -f $$list" \
+           | $(MAKE) $(AM_MAKEFLAGS) -f - am--clean || exit 1; \
+       fi; \
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
+
+## Recheck must depend on $(check_SCRIPTS), $(check_PROGRAMS), etc.
+recheck: %CHECK_DEPS%
+
+AM_RECURSIVE_TARGETS += check recheck
+
+.PHONY: recheck
 
-.PHONY: recheck recheck-html
-.MAKE: recheck recheck-html
+## ----------------------------------------------- ##
+## Produce HTML.  To be removed in automake 1.12.  ##
+## ----------------------------------------------- ##
 
-AM_RECURSIVE_TARGETS += recheck recheck-html
+include check-html.am
 
 else !%?PARALLEL_TESTS%
 
diff --git a/tests/check.test b/tests/check.test
index 0c258c5..3001228 100755
--- a/tests/check.test
+++ b/tests/check.test
@@ -29,8 +29,8 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^check-TESTS:' Makefile.in
-grep '^check-DEJAGNU' Makefile.in && Exit 1
+grep 'check-TESTS.*:' Makefile.in
+grep 'check-DEJAGNU' Makefile.in && Exit 1
 
 # check-TESTS is phony.
 sed -n '/^\.PHONY:/,/^$/p' Makefile.in | grep check-TESTS
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index fd095b3..6e4412f 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -617,6 +617,7 @@ parallel-tests7.test \
 parallel-tests8.test \
 parallel-tests9.test \
 parallel-tests10.test \
+parallel-tests-dryrun.test \
 parallel-tests-harderror.test \
 parallel-tests-unreadable-log.test \
 parallel-tests-subdir.test \
diff --git a/tests/parallel-tests-dryrun.test b/tests/parallel-tests-dryrun.test
new file mode 100755
index 0000000..c79a293
--- /dev/null
+++ b/tests/parallel-tests-dryrun.test
@@ -0,0 +1,93 @@
+#! /bin/sh
+# Copyright (C) 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
+# 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 parallel-tests interactions with "make -n".
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am <<'END'
+TESTS = foo.test bar.test
+$(TESTS):
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+# Avoid confusion with test logs.
+rm -f config.log
+
+log_files='test-suite.log foo.log bar.log'
+html_files='test-suite.html foo.html bar.html'
+the_files="$log_files $html_files"
+
+all_exist ()
+{
+  st=0
+  for i in $*; do
+    test -f $i || { echo File $i not found; st=1; }
+  done
+  test $st -eq 0
+}
+
+none_exist ()
+{
+  st=0
+  for i in $*; do
+    { test -r $i || test -f $i; } && { echo File $i found; st=1; }
+  done
+  test $st -eq 0
+}
+
+for targ in check recheck check-html recheck-html $the_files; do
+  $MAKE -n "$targ"
+  none_exist $the_files
+done
+
+touch $the_files
+
+$MAKE -n mostlyclean
+all_exist $the_files
+$MAKE -n clean
+all_exist $the_files
+
+cat > foo.test <<'END'
+#! /bin/sh
+exit 0
+END
+
+cat > bar.test <<'END'
+#! /bin/sh
+exit 1
+END
+
+chmod a+x foo.test bar.test
+
+$MAKE check && Exit 1
+
+for targ in recheck recheck-html clean mostlyclean distclean; do
+  $MAKE -n "$targ"
+  all_exist $the_files
+done
+
+:
diff --git a/tests/parallel-tests2.test b/tests/parallel-tests2.test
index 9cfe14f..78d5a76 100755
--- a/tests/parallel-tests2.test
+++ b/tests/parallel-tests2.test
@@ -76,14 +76,49 @@ env TESTS=foo.test $MAKE -e recheck-html >stdout || { cat 
stdout; Exit 1; }
 cat stdout
 test -f mylog.html
 
+# Create HTML output for an individual test.
+$MAKE foo.html
+grep 'this is .*foo\.test' foo.html
+test ! -f bar.html
+test ! -f baz.html
+
+# Create HTML output for individual tests.  Since the pre-existing log
+# files are expected to be used for the HTML conversion, this should
+# go smoothly even for failed tests.
+$MAKE bar.html baz.html
+grep 'this is .*bar\.test' bar.html
+grep 'this is .*baz\.test' baz.html
+
+# HTML output removed by mostlyclean.
+$MAKE mostlyclean
+test ! -f foo.html
+test ! -f bar.html
+test ! -f baz.html
+test ! -f mylog.html
+
 # check-html and recheck-html should cause check_SCRIPTS to be created,
 # and recheck-html should rerun no tests if check has not been run.
+
 $MAKE clean
+test ! -f mylog.html
 env TESTS=foo.test $MAKE -e check-html
 test -f bla
+test -f foo.log
+test ! -f bar.log
+test ! -f baz.log
+
 $MAKE clean
 env TESTS=foo.test $MAKE -e recheck-html
 test -f bla
 test ! -f foo.log
 test -f mylog.html
+
+$MAKE clean
+$MAKE recheck-html
+test -f bla
+test ! -f foo.log
+test ! -f bar.log
+test ! -f baz.log
+test -f mylog.html
+
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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