automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, next, updated. v1.10b-9-g68


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, next, updated. v1.10b-9-g68b7dc1
Date: Mon, 06 Apr 2009 05:51:58 +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=68b7dc1d9413d84179f879eb6720a585039eb8b3

The branch, next has been updated
       via  68b7dc1d9413d84179f879eb6720a585039eb8b3 (commit)
      from  8085398209424be5a3c9e760d62d9c9f90aa06c1 (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 68b7dc1d9413d84179f879eb6720a585039eb8b3
Author: Akim Demaille <address@hidden>
Date:   Mon Apr 6 07:03:16 2009 +0200

    parallel-tests: redo check-html, recheck, recheck-html.
    
    * lib/am/check.am (recheck, recheck-am): Remove.
    (recheck-TESTS): Rename to ...
    (recheck): ... this and rewrite, factored ...
    (recheck-html): ... with this rule.  Pass TEST_LOGS rather than
    RECHECK_LOGS to `check' and `check-html', respectively, to avoid
    running outdated tests.  Invoking the public macros ensures
    `check_SCRIPTS' etc. are created in time.  Do not output errors
    for tests that were not run yet.  If the testsuite has not run
    at all, run all tests.
    (check-html): Run `check' target, not `check-TESTS', to ensure
    `check_SCRIPTS' etc. are created in time.
    (.PHONY, .MAKE, AM_RECURSIVE_TARGETS): Adjust contents.
    * tests/parallel-tests2.test: Expose the check-html and
    recheck-html issues.
    * tests/parallel-tests9.test: Expose the recheck issues.
    Bugs in previous version pointed out by Akim, who already had
    them fixed in his original version.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

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

Summary of changes:
 ChangeLog                      |   22 ++++++++++++++
 lib/Automake/tests/Makefile.in |   44 +++++++++++++++------------
 lib/am/check.am                |   64 ++++++++++++++++++++++++---------------
 tests/Makefile.in              |   44 +++++++++++++++------------
 tests/parallel-tests2.test     |   16 ++++++++++
 tests/parallel-tests9.test     |   14 +++++++++
 6 files changed, 139 insertions(+), 65 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7eb5db7..0526ce5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2009-04-06  Akim Demaille  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       parallel-tests: redo check-html, recheck, recheck-html.
+       * lib/am/check.am (recheck, recheck-am): Remove.
+       (recheck-TESTS): Rename to ...
+       (recheck): ... this and rewrite, factored ...
+       (recheck-html): ... with this rule.  Pass TEST_LOGS rather than
+       RECHECK_LOGS to `check' and `check-html', respectively, to avoid
+       running outdated tests.  Invoking the public macros ensures
+       `check_SCRIPTS' etc. are created in time.  Do not output errors
+       for tests that were not run yet.  If the testsuite has not run
+       at all, run all tests.
+       (check-html): Run `check' target, not `check-TESTS', to ensure
+       `check_SCRIPTS' etc. are created in time.
+       (.PHONY, .MAKE, AM_RECURSIVE_TARGETS): Adjust contents.
+       * tests/parallel-tests2.test: Expose the check-html and
+       recheck-html issues.
+       * tests/parallel-tests9.test: Expose the recheck issues.
+       Bugs in previous version pointed out by Akim, who already had
+       them fixed in his original version.
+
 2009-04-04  Ralf Wildenhues  <address@hidden>
 
        parallel-tests: LOG_COMPILER for tests without known extension.
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index 0596752..5af0d0e 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -124,7 +124,7 @@ else dir="$(srcdir)/"; fi;                          \
 tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;           \
 $(TESTS_ENVIRONMENT)
 RECHECK_LOGS = $(TEST_LOGS)
-AM_RECURSIVE_TARGETS = check recheck check-html recheck-html
+AM_RECURSIVE_TARGETS = check check-html recheck recheck-html
 TEST_SUITE_LOG = test-suite.log
 TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
 am__test_logs1 = $(TESTS:=.log)
@@ -389,17 +389,6 @@ check-TESTS:
          set_logs=TEST_LOGS=;                                          \
        fi;                                                             \
        $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) $$set_logs
-recheck-TESTS:
-       @list='$(TEST_LOGS)';                                           \
-       logs=`for f in $$list; do                                       \
-               if read line < $$f; then                                \
-                 case $$line in FAIL*|XPASS*) echo $$f;; esac;         \
-               else echo $$f; fi;                                      \
-             done | tr '\012\015' '  '`;                               \
-       $(MAKE) $(AM_MAKEFLAGS) check-TESTS RECHECK_LOGS="$$logs"
-
-recheck-am: recheck-TESTS
-recheck: recheck-am
 
 .log.html:
        @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py';            \
@@ -415,15 +404,31 @@ recheck: recheck-am
        $$R2H $< >address@hidden
        @mv address@hidden $@
 
-# Be sure to run check-TESTS first, and then to convert the result.
-# Beware of concurrent executions.  And expect check-TESTS to fail.
-check-html recheck-html:
-       @target=`echo $@ | sed 's/-html$$//'`;                  \
-       if $(MAKE) $(AM_MAKEFLAGS) $$target-TESTS; then         \
+# 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
+recheck recheck-html:
+       @target=`echo $@ | sed 's,^re,,'`;                              \
+       list='$(TEST_LOGS)';                                            \
+       if test -f $(TEST_SUITE_LOG); then                              \
+         list=`for f in $$list; do                                     \
+                 test -f $$f || continue;                              \
+                 if read line < $$f; then                              \
+                   case $$line in FAIL*|XPASS*) echo $$f;; esac;       \
+                 else echo $$f; fi;                                    \
+               done | tr '\012\015' '  '`;                             \
+         args=TEST_LOGS=$$list;                                        \
+         $(MAKE) $(AM_MAKEFLAGS) $$target TEST_LOGS="$$list";          \
+       else                                                            \
+         $(MAKE) $(AM_MAKEFLAGS) $$target;                             \
+       fi
 .pl.log:
        @p='$<'; $(am__check_pre) $(PL_LOG_COMPILE) "$$tst" $(am__check_post)
 
@@ -557,7 +562,7 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: check-am check-html install-am install-strip recheck-am \
+.MAKE: check-am check-html install-am install-strip recheck \
        recheck-html
 
 .PHONY: all all-am check check-TESTS check-am check-html clean \
@@ -569,8 +574,7 @@ uninstall-am:
        install-ps install-ps-am install-strip installcheck \
        installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
-       pdf-am ps ps-am recheck recheck-TESTS recheck-am recheck-html \
-       uninstall uninstall-am
+       pdf-am ps ps-am recheck recheck-html uninstall uninstall-am
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/lib/am/check.am b/lib/am/check.am
index f5153e3..67ed8cd 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -239,23 +239,7 @@ check-TESTS:
        fi;                                                             \
        $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) $$set_logs
 
-## Rerun all FAILed or XPASSed tests (as well as all whose logs are out
-## of date or do not exist).
-recheck-TESTS:
-       @list='$(TEST_LOGS)';                                           \
-       logs=`for f in $$list; do                                       \
-               if read line < $$f; then                                \
-                 case $$line in FAIL*|XPASS*) echo $$f;; esac;         \
-               else echo $$f; fi;                                      \
-             done | tr '\012\015' '  '`;                               \
-       $(MAKE) $(AM_MAKEFLAGS) check-TESTS RECHECK_LOGS="$$logs"
-
-recheck-am: recheck-TESTS
-recheck: recheck-am
-.PHONY: recheck recheck-am recheck-TESTS
-.MAKE: recheck-am
-
-AM_RECURSIVE_TARGETS += check recheck
+AM_RECURSIVE_TARGETS += check
 
 ## -------------- ##
 ## Produce HTML.  ##
@@ -275,19 +259,49 @@ AM_RECURSIVE_TARGETS += check recheck
        $$R2H $< >address@hidden
        @mv address@hidden $@
 
-# Be sure to run check-TESTS first, and then to convert the result.
-# Beware of concurrent executions.  And expect check-TESTS to fail.
-check-html recheck-html:
-       @target=`echo $@ | sed 's/-html$$//'`;                  \
-       if $(MAKE) $(AM_MAKEFLAGS) $$target-TESTS; then         \
+# 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 recheck-html
-.MAKE: check-html recheck-html
 
-AM_RECURSIVE_TARGETS += check-html recheck-html
+.PHONY: check-html
+.MAKE: check-html
+
+AM_RECURSIVE_TARGETS += check-html
+
+## -------------------- ##
+## Rechecking failures. ##
+## -------------------- ##
+
+## Rerun all FAILed or XPASSed tests (as well as all whose logs are out
+## of date or do not exist).
+recheck recheck-html:
+       @target=`echo $@ | sed 's,^re,,'`;                              \
+       list='$(TEST_LOGS)';                                            \
+## If the test suite has not been run yet, then run it in full
+       if test -f $(TEST_SUITE_LOG); then                              \
+         list=`for f in $$list; do                                     \
+                 test -f $$f || continue;                              \
+                 if read line < $$f; then                              \
+                   case $$line in FAIL*|XPASS*) echo $$f;; esac;       \
+                 else echo $$f; fi;                                    \
+               done | tr '\012\015' '  '`;                             \
+         args=TEST_LOGS=$$list;                                        \
+         $(MAKE) $(AM_MAKEFLAGS) $$target TEST_LOGS="$$list";          \
+       else                                                            \
+         $(MAKE) $(AM_MAKEFLAGS) $$target;                             \
+       fi
+
+.PHONY: recheck recheck-html
+.MAKE: recheck recheck-html
+
+AM_RECURSIVE_TARGETS += recheck recheck-html
 
 else !%?PARALLEL_TESTS%
 
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 58de5e3..a903cd2 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -126,7 +126,7 @@ else dir="$(srcdir)/"; fi;                          \
 tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;           \
 $(TESTS_ENVIRONMENT)
 RECHECK_LOGS = $(TEST_LOGS)
-AM_RECURSIVE_TARGETS = check recheck check-html recheck-html
+AM_RECURSIVE_TARGETS = check check-html recheck recheck-html
 TEST_SUITE_LOG = test-suite.log
 TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
 TEST_EXTENSIONS = .test
@@ -1120,17 +1120,6 @@ check-TESTS:
          set_logs=TEST_LOGS=;                                          \
        fi;                                                             \
        $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) $$set_logs
-recheck-TESTS:
-       @list='$(TEST_LOGS)';                                           \
-       logs=`for f in $$list; do                                       \
-               if read line < $$f; then                                \
-                 case $$line in FAIL*|XPASS*) echo $$f;; esac;         \
-               else echo $$f; fi;                                      \
-             done | tr '\012\015' '  '`;                               \
-       $(MAKE) $(AM_MAKEFLAGS) check-TESTS RECHECK_LOGS="$$logs"
-
-recheck-am: recheck-TESTS
-recheck: recheck-am
 
 .log.html:
        @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py';            \
@@ -1146,15 +1135,31 @@ recheck: recheck-am
        $$R2H $< >address@hidden
        @mv address@hidden $@
 
-# Be sure to run check-TESTS first, and then to convert the result.
-# Beware of concurrent executions.  And expect check-TESTS to fail.
-check-html recheck-html:
-       @target=`echo $@ | sed 's/-html$$//'`;                  \
-       if $(MAKE) $(AM_MAKEFLAGS) $$target-TESTS; then         \
+# 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
+recheck recheck-html:
+       @target=`echo $@ | sed 's,^re,,'`;                              \
+       list='$(TEST_LOGS)';                                            \
+       if test -f $(TEST_SUITE_LOG); then                              \
+         list=`for f in $$list; do                                     \
+                 test -f $$f || continue;                              \
+                 if read line < $$f; then                              \
+                   case $$line in FAIL*|XPASS*) echo $$f;; esac;       \
+                 else echo $$f; fi;                                    \
+               done | tr '\012\015' '  '`;                             \
+         args=TEST_LOGS=$$list;                                        \
+         $(MAKE) $(AM_MAKEFLAGS) $$target TEST_LOGS="$$list";          \
+       else                                                            \
+         $(MAKE) $(AM_MAKEFLAGS) $$target;                             \
+       fi
 .test.log:
        @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
 
@@ -1290,7 +1295,7 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: check-am check-html install-am install-strip recheck-am \
+.MAKE: check-am check-html install-am install-strip recheck \
        recheck-html
 
 .PHONY: all all-am check check-TESTS check-am check-html clean \
@@ -1302,8 +1307,7 @@ uninstall-am:
        install-pdf-am install-ps install-ps-am install-strip \
        installcheck installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
-       pdf-am ps ps-am recheck recheck-TESTS recheck-am recheck-html \
-       uninstall uninstall-am
+       pdf-am ps ps-am recheck recheck-html uninstall uninstall-am
 
 
 $(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
diff --git a/tests/parallel-tests2.test b/tests/parallel-tests2.test
index f9e2a3c..3331a0c 100755
--- a/tests/parallel-tests2.test
+++ b/tests/parallel-tests2.test
@@ -30,11 +30,16 @@ END
 cat > Makefile.am << 'END'
 TEST_SUITE_LOG = mylog.log
 TESTS = foo.test bar.test baz.test
+check_SCRIPTS = bla
+bla:
+       echo bla > $@
+CLEANFILES = bla
 END
 
 cat >>foo.test <<'END'
 #! /bin/sh
 echo "this is $0"
+test -f bla || exit 1
 exit 0
 END
 cat >>bar.test <<'END'
@@ -69,4 +74,15 @@ rm -f mylog.html
 env TESTS=foo.test $MAKE -e recheck-html >stdout || { cat stdout; Exit 1; }
 cat stdout
 test -f mylog.html
+
+# check-html and recheck-html should cause check_SCRIPTS to be created,
+# and recheck-html should rerun all tests if check has not been run.
+$MAKE clean
+env TESTS=foo.test $MAKE -e check-html
+test -f bla
+$MAKE clean
+env TESTS=foo.test $MAKE -e recheck-html
+test -f bla
+test -f foo.log
+test -f mylog.html
 :
diff --git a/tests/parallel-tests9.test b/tests/parallel-tests9.test
index 7c935d9..a61df60 100755
--- a/tests/parallel-tests9.test
+++ b/tests/parallel-tests9.test
@@ -28,11 +28,16 @@ END
 cat > Makefile.am << 'END'
 TEST_SUITE_LOG = mylog.log
 TESTS = foo.test bar.test baz.test
+check_SCRIPTS = bla
+CLEANFILES = bla
+bla:
+       echo bla > $@
 END
 
 cat >>foo.test <<'END'
 #! /bin/sh
 echo "this is $0"
+test -f bla || exit 1
 exit 0
 END
 cat >>bar.test <<'END'
@@ -67,4 +72,13 @@ $MAKE recheck >stdout && { cat stdout; Exit 1; }
 cat stdout
 grep foo.test stdout || Exit 1
 
+# Ensure that recheck builds check_SCRIPTS, and that
+# recheck reruns all tests if check has not been run.
+$MAKE clean
+$MAKE recheck && Exit 1
+test -f bla
+test -f foo.log
+test -f bar.log
+test -f baz.log
+test -f mylog.log
 :


hooks/post-receive
--
GNU Automake




reply via email to

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