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


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-57-gd3f3013
Date: Sun, 18 Oct 2009 09:22:28 +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=d3f3013d853f36cd6fbc8f61ebecf91e5bb400ed

The branch, master has been updated
       via  d3f3013d853f36cd6fbc8f61ebecf91e5bb400ed (commit)
       via  a6a7834f03248dc3b1da1d70b40fcaf37967b4ab (commit)
       via  ba8a10e5e24c4df4bacd072ad755f295596861e0 (commit)
      from  8d685d25fe828400409f024fec00a8b58c54f34e (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 d3f3013d853f36cd6fbc8f61ebecf91e5bb400ed
Merge: 8d685d25fe828400409f024fec00a8b58c54f34e 
a6a7834f03248dc3b1da1d70b40fcaf37967b4ab
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Oct 18 11:19:03 2009 +0200

    Merge branch 'perl-coverage'
    
    * perl-coverage:
      Perl coverage support using Devel::Cover.
      Add convenience `recheck' target to our toplevel Makefile.am.

commit a6a7834f03248dc3b1da1d70b40fcaf37967b4ab
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Oct 17 18:14:33 2009 +0200

    Perl coverage support using Devel::Cover.
    
    This introduces makefile rules to run the testsuite with Perl
    coverage enabled.  It skips tests that use perl ithreads, by
    unsetting AUTOMAKE_JOBS and setting WANT_NO_THREADS to make the
    threaded tests skip.
    
    * Makefile.am (PERL_COVERAGE_DB, PERL_COVERAGE_FLAGS)
    (PERL_COVER): New variables.
    (check-coverage, recheck-coverage, clean-coverage): New phony
    targets.
    (check-coverage-run, recheck-coverage-run): New phony helper
    targets.
    (clean-local): New, depend on clean-coverage.
    * lib/Automake/tests/Condition-t.pl: Skip if WANT_NO_THREADS is
    set.
    * lib/Automake/tests/DisjConditions-t.pl: Likewise.
    * tests/defs.in: New required entry 'perl-threads'.
    * tests/parallel-am.test: Use it to skip if WANT_NO_THREADS is
    set.
    * tests/parallel-am2.test: Likewise.
    * tests/parallel-am3.test: Likewise.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit ba8a10e5e24c4df4bacd072ad755f295596861e0
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Oct 17 15:18:27 2009 +0200

    Add convenience `recheck' target to our toplevel Makefile.am.
    
    * Makefile.am (recheck): New convenience target.
    * tests/README: Give examples for running only failed or
    outdated or otherwise selected tests.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

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

Summary of changes:
 ChangeLog                              |   26 ++++++++++
 HACKING                                |    3 +
 Makefile.am                            |   52 +++++++++++++++++++++
 Makefile.in                            |   80 ++++++++++++++++++++++++++------
 lib/Automake/tests/Condition-t.pl      |    6 ++-
 lib/Automake/tests/DisjConditions-t.pl |    6 ++-
 tests/README                           |   22 ++++++++-
 tests/defs.in                          |    4 ++
 tests/parallel-am.test                 |    3 +-
 tests/parallel-am2.test                |    3 +-
 tests/parallel-am3.test                |    3 +-
 11 files changed, 184 insertions(+), 24 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 763c573..0dd9199 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,31 @@
 2009-10-17  Ralf Wildenhues  <address@hidden>
 
+       Perl coverage support using Devel::Cover.
+       This introduces makefile rules to run the testsuite with Perl
+       coverage enabled.  It skips tests that use perl ithreads, by
+       unsetting AUTOMAKE_JOBS and setting WANT_NO_THREADS to make the
+       threaded tests skip.
+       * Makefile.am (PERL_COVERAGE_DB, PERL_COVERAGE_FLAGS)
+       (PERL_COVER): New variables.
+       (check-coverage, recheck-coverage, clean-coverage): New phony
+       targets.
+       (check-coverage-run, recheck-coverage-run): New phony helper
+       targets.
+       (clean-local): New, depend on clean-coverage.
+       * lib/Automake/tests/Condition-t.pl: Skip if WANT_NO_THREADS is
+       set.
+       * lib/Automake/tests/DisjConditions-t.pl: Likewise.
+       * tests/defs.in: New required entry 'perl-threads'.
+       * tests/parallel-am.test: Use it to skip if WANT_NO_THREADS is
+       set.
+       * tests/parallel-am2.test: Likewise.
+       * tests/parallel-am3.test: Likewise.
+
+       Add convenience `recheck' target to our toplevel Makefile.am.
+       * Makefile.am (recheck): New convenience target.
+       * tests/README: Give examples for running only failed or
+       outdated or otherwise selected tests.
+
        dist: allow running several compressors in parallel.
        * lib/am/distdir.am (am__post_remove_distdir): New internal
        variable.
diff --git a/HACKING b/HACKING
index 64d55f9..c8ae47e 100644
--- a/HACKING
+++ b/HACKING
@@ -125,6 +125,9 @@
 * Use `keep_testdirs=yes' to keep test directories for successful
   tests also.
 
+* Use perl coverage information to ensure your new code is thoroughly
+  tested by your new tests.
+
 ================================================================
 = Release procedure
 
diff --git a/Makefile.am b/Makefile.am
index e8edc66..70cb642 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -94,6 +94,23 @@ automake aclocal: Makefile
 INSTALL: lib/INSTALL
        $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
 
+## recheck: convenience proxy target for the test suites.
+TEST_SUBDIRS = lib/Automake/tests tests
+
+.PHONY: recheck
+recheck:
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       for subdir in $(TEST_SUBDIRS); do \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) || eval $$failcom; \
+       done; \
+       test -z "$$fail"
+
 ################################################################
 ##
 ## Everything past here is useful to the maintainer, but probably not
@@ -104,6 +121,41 @@ INSTALL: lib/INSTALL
 dist-hook:
        cd $(distdir)/tests && chmod a+rx *.test
 
+
+# Perl coverage statistics.
+PERL_COVERAGE_DB = $(abs_top_builddir)/cover_db
+PERL_COVERAGE_FLAGS = 
-MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off
+PERL_COVER = cover
+
+check-coverage-run recheck-coverage-run: all
+       $(mkinstalldirs) $(PERL_COVERAGE_DB)
+       PERL5OPT="$$PERL5OPT $(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
+       WANT_NO_THREADS=yes; export WANT_NO_THREADS; unset AUTOMAKE_JOBS; \
+       $(MAKE) $(AM_MAKEFLAGS) `echo $@ | sed 's/-coverage-run//'`
+
+check-coverage-report:
+       @if test ! -d "$(PERL_COVERAGE_DB)"; then \
+         echo "No coverage database found in \`$(PERL_COVERAGE_DB)'." >&2; \
+         echo "Please run \`make check-coverage' first" >&2; \
+         exit 1; \
+       fi
+       $(PERL_COVER) $(PERL_COVER_FLAGS) "$(PERL_COVERAGE_DB)"
+
+# We don't use direct dependencies here because we'd like to be able
+# to invoke the report even after interrupted check-coverage.
+check-coverage: check-coverage-run
+       $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
+
+recheck-coverage: recheck-coverage-run
+       $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
+
+clean-coverage:
+       rm -rf "$(PERL_COVERAGE_DB)"
+clean-local: clean-coverage
+
+.PHONY: check-coverage recheck-coverage check-coverage-run \
+       recheck-coverage-run check-coverage-report clean-coverage
+
 # Some simple checks, and then ordinary check.  These are only really
 # guaranteed to work on my machine.
 syntax_check_rules = \
diff --git a/Makefile.in b/Makefile.in
index 6727cf3..100b192 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -255,6 +255,12 @@ do_subst = sed \
   -e 's,address@hidden@],Generated from address@hidden; do not edit by 
hand.,g' \
   -e 's,address@hidden@],$(datadir),g'
 
+TEST_SUBDIRS = lib/Automake/tests tests
+
+# Perl coverage statistics.
+PERL_COVERAGE_DB = $(abs_top_builddir)/cover_db
+PERL_COVERAGE_FLAGS = 
-MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off
+PERL_COVER = cover
 
 # Some simple checks, and then ordinary check.  These are only really
 # guaranteed to work on my machine.
@@ -760,7 +766,7 @@ maintainer-clean-generic:
        @echo "it deletes files that may require special tools to rebuild."
 clean: clean-recursive
 
-clean-am: clean-generic mostlyclean-am
+clean-am: clean-generic clean-local mostlyclean-am
 
 distclean: distclean-recursive
        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
@@ -835,20 +841,21 @@ uninstall-am: uninstall-binSCRIPTS
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
        all all-am am--refresh check check-am clean clean-cscope \
-       clean-generic cscope cscopelist cscopelist-recursive ctags \
-       ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \
-       dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
-       distclean distclean-generic distclean-tags distcleancheck \
-       distdir distuninstallcheck dvi dvi-am html html-am info \
-       info-am install install-am install-binSCRIPTS install-data \
-       install-data-am install-dvi install-dvi-am install-exec \
-       install-exec-am install-exec-hook install-html install-html-am \
-       install-info install-info-am install-man install-pdf \
-       install-pdf-am install-ps install-ps-am install-strip \
-       installcheck installcheck-am installdirs installdirs-am \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
-       uninstall uninstall-am uninstall-binSCRIPTS uninstall-hook
+       clean-generic clean-local cscope cscopelist \
+       cscopelist-recursive ctags ctags-recursive dist dist-all \
+       dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ \
+       dist-xz dist-zip distcheck distclean distclean-generic \
+       distclean-tags distcleancheck distdir distuninstallcheck dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-binSCRIPTS install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-exec-hook \
+       install-html install-html-am install-info install-info-am \
+       install-man install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs installdirs-am maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+       pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+       uninstall-binSCRIPTS uninstall-hook
 
 
 install-exec-hook:
@@ -880,12 +887,55 @@ automake aclocal: Makefile
 INSTALL: lib/INSTALL
        $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
 
+.PHONY: recheck
+recheck:
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       for subdir in $(TEST_SUBDIRS); do \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) || eval $$failcom; \
+       done; \
+       test -z "$$fail"
+
 ################################################################
 
 # Ensure tests are world-executable
 dist-hook:
        cd $(distdir)/tests && chmod a+rx *.test
 
+check-coverage-run recheck-coverage-run: all
+       $(mkinstalldirs) $(PERL_COVERAGE_DB)
+       PERL5OPT="$$PERL5OPT $(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
+       WANT_NO_THREADS=yes; export WANT_NO_THREADS; unset AUTOMAKE_JOBS; \
+       $(MAKE) $(AM_MAKEFLAGS) `echo $@ | sed 's/-coverage-run//'`
+
+check-coverage-report:
+       @if test ! -d "$(PERL_COVERAGE_DB)"; then \
+         echo "No coverage database found in \`$(PERL_COVERAGE_DB)'." >&2; \
+         echo "Please run \`make check-coverage' first" >&2; \
+         exit 1; \
+       fi
+       $(PERL_COVER) $(PERL_COVER_FLAGS) "$(PERL_COVERAGE_DB)"
+
+# We don't use direct dependencies here because we'd like to be able
+# to invoke the report even after interrupted check-coverage.
+check-coverage: check-coverage-run
+       $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
+
+recheck-coverage: recheck-coverage-run
+       $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
+
+clean-coverage:
+       rm -rf "$(PERL_COVERAGE_DB)"
+clean-local: clean-coverage
+
+.PHONY: check-coverage recheck-coverage check-coverage-run \
+       recheck-coverage-run check-coverage-report clean-coverage
+
 .PHONY: $(syntax_check_rules)
 $(syntax_check_rules): automake aclocal
 maintainer-check: $(syntax_check_rules)
diff --git a/lib/Automake/tests/Condition-t.pl 
b/lib/Automake/tests/Condition-t.pl
index 06eb34e..0f1dde8 100644
--- a/lib/Automake/tests/Condition-t.pl
+++ b/lib/Automake/tests/Condition-t.pl
@@ -1,4 +1,5 @@
-# Copyright (C) 2001, 2002, 2003, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2008, 2009  Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -18,7 +19,8 @@
 BEGIN {
   use Config;
   if (eval { require 5.007_002; }      # for CLONE support
-      && $Config{useithreads})
+      && $Config{useithreads}
+      && !$ENV{WANT_NO_THREADS})
     {
       require threads;
       import threads;
diff --git a/lib/Automake/tests/DisjConditions-t.pl 
b/lib/Automake/tests/DisjConditions-t.pl
index 2fe275b..eccdcd6 100644
--- a/lib/Automake/tests/DisjConditions-t.pl
+++ b/lib/Automake/tests/DisjConditions-t.pl
@@ -1,4 +1,5 @@
-# Copyright (C) 2001, 2002, 2003, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2008, 2009  Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -18,7 +19,8 @@
 BEGIN {
   use Config;
   if (eval { require 5.007_002; }      # for CLONE support
-      && $Config{useithreads})
+      && $Config{useithreads}
+      && !$ENV{WANT_NO_THREADS})
     {
       require threads;
       import threads;
diff --git a/tests/README b/tests/README
index 4068ad6..d494b10 100644
--- a/tests/README
+++ b/tests/README
@@ -5,15 +5,33 @@ User interface
 ==============
 
 
-Running all tests
+Running the tests
 -----------------
 
-  make check
+  To run all tests:
+
+    make -k check
 
   You can use `-jN' for faster completion (it even helps on a
   uniprocessor system, due to unavoidable sleep delays, as
   noted below).
 
+  To rerun only failed tests:
+
+    make -k recheck
+
+  To run only tests that are newer than their last results:
+
+    make -k check RECHECK_LOGS=
+
+  To run only selected tests:
+
+    make -k check TESTS="foo.test bar.test"
+
+  For non-GNU make, you might have to use this instead:
+
+    env TESTS="foo.test bar.test" make -e -k check
+
 
 Interpretation
 --------------
diff --git a/tests/defs.in b/tests/defs.in
index ecdf069..6eec344 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -170,6 +170,10 @@ do
       rm -f $priv_check_temp
       test $overwrite_status = 0 && exit 77
       ;;
+    perl-threads)
+      # Skip with Devel::Cover: it cannot cope with threads.
+      test "$WANT_NO_THREADS" = yes && exit 77
+      ;;
     python)
       # Python doesn't support --version, it has -V
       echo "$me: running python -V"
diff --git a/tests/parallel-am.test b/tests/parallel-am.test
index 4aef628..c46377b 100755
--- a/tests/parallel-am.test
+++ b/tests/parallel-am.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009  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
@@ -35,6 +35,7 @@
 #
 # This test checks (0), (1), and (2).  See sister tests for further coverage.
 
+required=perl-threads
 . ./defs || Exit 1
 
 set -e
diff --git a/tests/parallel-am2.test b/tests/parallel-am2.test
index 20225a0..d929740 100755
--- a/tests/parallel-am2.test
+++ b/tests/parallel-am2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009  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,6 +20,7 @@
 # 4) warning and normal error output should be identical, in that duplicate
 #    warnings should be omitted in the same way as without threads,
 
+required=perl-threads
 . ./defs || Exit 1
 
 set -e
diff --git a/tests/parallel-am3.test b/tests/parallel-am3.test
index 5db9c67..104376a 100755
--- a/tests/parallel-am3.test
+++ b/tests/parallel-am3.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009  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,6 +21,7 @@
 #    with --add-missing, even with concurrent file requirements, and the
 #    installation of aux files should be race-free,
 
+required=perl-threads
 . ./defs || Exit 1
 
 set -e


hooks/post-receive
-- 
GNU Automake




reply via email to

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