automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.2


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.2-719-g0e72e08
Date: Mon, 30 Jul 2012 09:38:56 +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=0e72e0851cc26c5cf322ff991f843f03b6e3fb0c

The branch, ng/master has been updated
       via  0e72e0851cc26c5cf322ff991f843f03b6e3fb0c (commit)
       via  e4fbe2ab6dee137d2f4735ca539613bb67411ebb (commit)
       via  a38534b1de0d0b582297cea30d163405f03924e3 (commit)
       via  de0e2a842be1c7ae4f4ab6ce1f47cc0f8fb4543e (commit)
       via  47dfbb43195e90edf199c10a91fa7a497eb63c5a (commit)
       via  e88f235d04d53295beeb17d9d41e04bbe5b82206 (commit)
       via  ef7b8500dd4f93ed3411d06b45dcd4134e641bd0 (commit)
       via  b300a4cb19fc524d4d640f62754a2b803d8018ba (commit)
       via  86da267360d2b32941f17ccad07204f94bbd043d (commit)
       via  39cf4fd6a88387fa14b02644576d89d7e957733e (commit)
       via  63f8c3647b2e8015dc637791bb92981d4a00dab7 (commit)
       via  7a498f9e8da31615aeb29cc860eb229738aeab2f (commit)
      from  0e72e0312428321571c7041b33b5cdc31f844650 (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 0e72e0851cc26c5cf322ff991f843f03b6e3fb0c
Merge: de0e2a8 e4fbe2a
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 11:31:28 2012 +0200

    Merge branch 'master' into ng/master
    
    * master:
      build: fix build in VPATH setup
      news: fix a couple of minor formatting issues
      gen-tests: simplify sourcing of helper shell files
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit de0e2a842be1c7ae4f4ab6ce1f47cc0f8fb4543e
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 10:33:28 2012 +0200

    [ng] rename: am__check_cook_with_exeext -> am.test-suite.cook-with-exeext
    
    * lib/am/serial-tests.am: Here.  Also, rename 'am__check_cook_with_exeext_1'
    as 'am.test-suite.cook-with-exeext.helper'.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 47dfbb43195e90edf199c10a91fa7a497eb63c5a
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 10:03:58 2012 +0200

    [ng] parallel-tests: define $(TEST_SUITE_LOG) in makefile fragment
    
    * lib/am/parallel-tests.am: Here (unless already defined) ...
    * automake.in (handle_tests): ... rather than here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit e88f235d04d53295beeb17d9d41e04bbe5b82206
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 09:56:24 2012 +0200

    [ng] rename: am.abs-dir -> am.dir.abs, am.abs-top-dir -> am.top-dir.abs
    
    Suggested by Akim Demaille:
    <http://lists.gnu.org/archive/html/automake-ng/2012-07/msg00228.html>
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit ef7b8500dd4f93ed3411d06b45dcd4134e641bd0
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 09:40:05 2012 +0200

    [ng] refactor: consider $(EXEEXT) used if non-empty at make runtime
    
    To check whether we should handle $(EXEEXT), simply check for
    "ifdef EXEEXT" in our Makefile fragments, rather than also checking
    whether EXEEXT has been set as a configure-time AC_SUBST.  This
    simplifies the logic, and move it completely at make runtime, rather
    than having it split between automake runtime (to decide whether
    EXEEXT is AC_SUBST) and make runtime (to decide whether $(EXEEXT) is
    empty).
    
    * lib/am/header-vars.am (EXEEXT): Default to empty.  This is required
    to avoid environment interferences.
    (am.conf.handle-exeext): Define this no more.
    * lib/am/parallel-tests.am, lib/am/serial-tests.am: Simply look
    at $(EXEEXT), rather than using $(am.conf.handle-exeext), or the
    '%?HANDLE-EXEEXT%' transform.
    * automake.in (process_file): Don't define that transform anymore.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit b300a4cb19fc524d4d640f62754a2b803d8018ba
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jul 28 11:54:27 2012 +0200

    [ng] tests: do not run very expensive tests by default
    
    Some tests in the Automake testsuite (especially those testing for bugs
    w.r.t. command-line length limits) require a *long* time to run.  For
    example, the test 'parallel-tests-many.sh' (the most extreme example of
    this issue) takes ~ 11 minutes to execute on a modern, blazingly fast
    multi-core ppc64 system (64 cores at 3.5 GHz each).
    
    This slow-down is unacceptable during routine runs of the testsuite,
    that I do every bunch of commits (or every commit, for more tricky
    changes).  And is even less acceptable for the casual user that just
    run the testsuite before installing Automake, maybe on an aging and
    slower system (or maybe on Cygwin *shudder*).
    
    So, let's follow the route of GNU coreutils here: declare some tests as
    "expensive", and let them run only if called if the RUN_EXPENSIVE_TESTS
    environment variable is set to "yes".
    
    * test-lib.sh (expensive_): New function; used in a test, cause it to be
    skipped unless the RUN_EXPENSIVE_TESTS variable is defined to "yes".
    * t/parallel-tests-many.sh, t/testsuite-summary-count-many.sh,
    t/dist-many.sh: Call 'expensive_'.
    * runtest.in: Export RUN_EXPENSIVE_TESTS to "yes": if a test is called
    directly through './runtest', it should be run even it it's expensive.
    * Makefile.am (check-expensive, installcheck-expensive): New convenience
    targets that run the testsuite with RUN_EXPENSIVE_TESTS exported to
    "yes", so that the expensive tests are not skipped.
    * t/README: Update.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 86da267360d2b32941f17ccad07204f94bbd043d
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jul 28 10:59:08 2012 +0200

    [ng] serial-tests: remove one level of indentation in a recipe
    
    * lib/am/serial-tests.am (check-TESTS): Here.  And add a few comments.
    These changes make the already quite complicated recipe slightly easier
    to follow.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 39cf4fd6a88387fa14b02644576d89d7e957733e
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jul 28 10:34:03 2012 +0200

    [ng] rename: am__dir -> am.dir, am__abs_dir -> am.abs-dir, etc.
    
    Complete list of renames:
    
      am__dir          ->  am.dir
      am__abs_dir      ->  am.abs-dir
      am__top_dir      ->  am.top-dir
      am__abs_top_dir  ->  am.abs-top-dir
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 Makefile.am                       |    5 +
 NEWS                              |   10 +-
 automake.in                       |    3 -
 gen-testsuite-part                |    3 +-
 lib/am/am-dir.am                  |   18 ++--
 lib/am/check-typos.am             |    6 +-
 lib/am/distdir.am                 |    8 +-
 lib/am/header-vars.am             |    6 +-
 lib/am/parallel-tests.am          |   19 +++--
 lib/am/serial-tests.am            |  172 +++++++++++++++++++------------------
 runtest.in                        |    4 +
 t/README                          |    8 ++-
 t/am-dir.sh                       |   20 ++--
 t/ax/test-lib.sh                  |    7 ++
 t/dist-many.sh                    |    2 +
 t/parallel-tests-many.sh          |    2 +
 t/testsuite-summary-count-many.sh |    2 +
 17 files changed, 166 insertions(+), 129 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 362be99..2cca5d5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -422,6 +422,7 @@ EXTRA_DIST += t/ax/distcheck-hook-m4.am
 
 t/ax/test-defs.sh: t/ax/test-defs.in Makefile
        $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_at)$(MKDIR_P) $(@D)
        $(AM_V_GEN)$(do_subst)
        $(generated_file_finalize)
 EXTRA_DIST += t/ax/test-defs.in
@@ -492,6 +493,10 @@ installcheck-local: installcheck-testsuite
 installcheck-testsuite:
        am_running_installcheck=yes $(MAKE) check
 
+# Run the testsuite without skipping expensive tests by default.
+check-expensive installcheck-expensive: %-expensive:
+       $(MAKE) $* RUN_EXPENSIVE_TESTS=yes
+
 # Performance tests.
 perf_TESTS = $(wildcard $(srcdir)/t/perf/*.sh) \
              $(wildcard $(srcdir)/t/perf/*.tap)
diff --git a/NEWS b/NEWS
index 0df7b2d..f308752 100644
--- a/NEWS
+++ b/NEWS
@@ -72,7 +72,7 @@ New in 1.13:
 * Texinfo Support:
 
   - The rules to build PDF and DVI files from Texinfo input now use the
-    ' --build-dir' option, to keep the auxiliary files used by texi2dvi
+    '--build-dir' option, to keep the auxiliary files used by texi2dvi
     and texi2pdf around without cluttering the build directory, and to
     make it possible to run the "dvi" and "pdf" recipes in parallel.
 
@@ -93,10 +93,10 @@ New in 1.13:
 
 * Recursive targets:
 
-  The user can now define his own recursive targets that recurse
-  in the directories specified in $(SUBDIRS).  This can be done by
-  specifying the name of such targets in invocations of the new
-  'AM_EXTRA_RECURSIVE_TARGETS' m4 macro.
+  - The user can now define his own recursive targets that recurse
+    in the directories specified in $(SUBDIRS).  This can be done by
+    specifying the name of such targets in invocations of the new
+    'AM_EXTRA_RECURSIVE_TARGETS' m4 macro.
 
   - Any failure in the recipe of the "tags", "ctags", "cscope" or
     "cscopelist" targets in a subdirectory is now propagated to the
diff --git a/automake.in b/automake.in
index 01df5fe..cb3bd66 100644
--- a/automake.in
+++ b/automake.in
@@ -4109,7 +4109,6 @@ sub handle_tests
         }
       else
         {
-         define_variable ('TEST_SUITE_LOG', INTERNAL, 'test-suite.log');
           require_conf_file ("parallel-tests", FOREIGN, 'test-driver');
           almost_verbatim ('parallel-tests', 'CHECK-DEPS' => "@check");
        }
@@ -5799,8 +5798,6 @@ sub preprocess_file ($%)
 
                 'LIBTOOL'      => !! var ('LIBTOOL'),
                 'NONLIBTOOL'   => 1,
-                 'HANDLE-EXEEXT' => (exists $configure_vars{'EXEEXT'} ?
-                                     'TRUE' : 'FALSE'),
                 'SILENT'       => silent_flag (),
                %transform);
 
diff --git a/gen-testsuite-part b/gen-testsuite-part
index 50f8a70..da80f81 100755
--- a/gen-testsuite-part
+++ b/gen-testsuite-part
@@ -359,7 +359,8 @@ foreach my $lt (TRUE, FALSE)
               required="@required"
               . ./defs || exit 1
               plan_ $planned
-              . "\$am_testauxdir/depcomp.sh"; exit \$?
+              . depcomp.sh
+              exit \$?
 EOF
           },
           0555);
diff --git a/lib/am/am-dir.am b/lib/am/am-dir.am
index 17381c2..9d82b10 100644
--- a/lib/am/am-dir.am
+++ b/lib/am/am-dir.am
@@ -19,25 +19,25 @@
 # the filesystem.  It is not created by default; recipes needing it
 # should add an order-only dependency on it, as in:
 #
-#     am-rule: am-prereqs | $(am__dir)
-#         [recipe creating/using files in $(am__dir)]
+#     am-rule: am-prereqs | $(am.dir)
+#         [recipe creating/using files in $(am.dir)]
 #
-am__dir = .am
+am.dir = .am
 
 # Its counterpart with an absolute path, for recipes that can chdir around.
-am__abs_dir = $(abs_builddir)/$(am__dir)
+am.dir.abs = $(abs_builddir)/$(am.dir)
 
 # Its counterpart for use in subdir makefiles, in case they need to refer
-# to the top-level $(am__dir) directory.
-am__top_dir = $(top_builddir)/$(am__dir)
+# to the top-level $(am.dir) directory.
+am.top-dir = $(top_builddir)/$(am.dir)
 
 # Its counterpart with an absolute path and for use in subdir makefiles.
-am__abs_top_dir = $(abs_top_builddir)/$(am__dir)
+am.top-dir.abs = $(abs_top_builddir)/$(am.dir)
 
 .PHONY: am--distclean-amdir
 am--distclean-amdir:
-       rm -rf $(am__dir)
+       rm -rf $(am.dir)
 distclean-am: am--distclean-amdir
 
-$(am__dir):
+$(am.dir):
        @mkdir $@
diff --git a/lib/am/check-typos.am b/lib/am/check-typos.am
index e52e5e4..89e7db7 100644
--- a/lib/am/check-typos.am
+++ b/lib/am/check-typos.am
@@ -110,17 +110,17 @@ else # $(AM_FORCE_SANITY_CHECKS) != yes
 #    Makefile: .am/check-typos-stamp.mk: No such file or directory
 # Although such a warning would *not* be an error in our setup, it still
 # is ugly and annoying enough to justify ...
--include $(am__dir)/check-typos-stamp.mk
+-include $(am.dir)/check-typos-stamp.mk
 
 # ... this workaround; which is required by the fact that, if a recipe
 # meant to rebuild a file included with "-include" file fails, the make
 # run itself is not considered failed (this is quite consistent with
 # the "-include" semantics).
 ifdef .am/sanity-checks-failed
-$(shell rm -f $(am__dir)/check-typos-stamp.mk)
+$(shell rm -f $(am.dir)/check-typos-stamp.mk)
 $(error Some Automake-NG sanity checks failed)
 else
-$(am__dir)/check-typos-stamp.mk: %MAKEFILE% | $(am__dir)
+$(am.dir)/check-typos-stamp.mk: %MAKEFILE% | $(am.dir)
        @if \
          $(MAKE) --no-print-directory AM_FORCE_SANITY_CHECKS=yes .am/nil; \
        then \
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 2312fd4..310b338 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -73,7 +73,7 @@ am.mkdir-for-dist = \
   @$(MKDIR_P) $(patsubst %,"$(distdir)"/%,$1)$(am.chars.newline)
 am.write-list-of-distfiles = \
   @lst='$1'; for x in $$lst; do echo $$x; done \
-    >> $(am__dir)/address@hidden(am.chars.newline)
+    >> $(am.dir)/address@hidden(am.chars.newline)
 
 if %?TOPDIR_P%
 distdir = $(PACKAGE)-$(VERSION)
@@ -133,7 +133,7 @@ if %?SUBDIRS%
 AM_RECURSIVE_TARGETS += distdir
 endif %?SUBDIRS%
 
-distdir: $(am.dist.all-files) | $(am__dir)
+distdir: $(am.dist.all-files) | $(am.dir)
 ##
 ## For Gnits users, this is pretty handy.  Look at 15 lines
 ## in case some explanatory text is desirable.
@@ -164,7 +164,7 @@ endif %?TOPDIR_P%
 ## There are situations in which 'ln' can fail.  For instance a file to
 ## distribute could actually be a cross-filesystem symlink -- this can
 ## easily happen if "gettextize" was run on the distribution.
-       @rm -f $(am__dir)/address@hidden
+       @rm -f $(am.dir)/address@hidden
        $(call am.xargs-map,am.write-list-of-distfiles, \
               $(am.dist.files-cooked))
        @while read file; do \
@@ -200,7 +200,7 @@ endif %?TOPDIR_P%
            || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
-       done < $(am__dir)/address@hidden
+       done < $(am.dir)/address@hidden
 ##
 ## Test for directory existence here because previous automake
 ## invocation might have created some directories.  Note that we
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index fc3d3cf..e86f5b3 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -102,6 +102,9 @@ endef
 ifeq ($(call am.vars.is-undef,SUBDIRS),yes)
   SUBDIRS :=
 endif
+ifeq ($(call am.vars.is-undef,EXEEXT),yes)
+  EXEEXT :=
+endif
 
 # CDPATH is only useful in interactive usage, and should never be exported
 # in the environment; doing so could cause our recipes and scripts to chdir
@@ -180,9 +183,6 @@ am.util.uniq = $(strip \
            $(am.chars.empty), \
            $(lastword $(1)))))
 
-?HANDLE-EXEEXT?am.conf.handle-exeext := yes
-?!HANDLE-EXEEXT?am.conf.handle-exeext := no
-
 ## These definitions have been generated by the following Bash 4 script:
 ##
 ##    #!/bin/bash
diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.am
index defd88b..116d178 100644
--- a/lib/am/parallel-tests.am
+++ b/lib/am/parallel-tests.am
@@ -66,12 +66,10 @@ $(2)LOG_DRIVER = $(SHELL) $(am.conf.aux-dir)/test-driver
 endif
 %.log %.trs: %$1 $$($(2)LOG_DEPENDENCIES)
        @$$(call am.test-suite.runtest,$2)
-ifeq ($(am.conf.handle-exeext),yes)
 ifdef EXEEXT
 %.log %.trs: %$1$(EXEEXT) $$($(2)LOG_DEPENDENCIES)
        @$$(call am.test-suite.runtest,$2)
-endif # defined EXEEXT
-endif # am.conf.handle-exeext = yes
+endif
 endef
 
 define am.test-suite.handle-suffix
@@ -103,10 +101,11 @@ $(eval $(call am.test-suite.handle-suffix))
 #   TESTS = $(wildcard $(srcdir)/t[0-9][0-9]*.sh)
 # where removing the $(srcdir) from the $(wildcard) invocation would
 # cause the idiom to break in VPATH builds.
-am.test-suite.get-test-bases = $(patsubst $(srcdir)/%,%,$(strip \
-$(call am.util.strip-suffixes, $(TEST_EXTENSIONS), \
-?!HANDLE-EXEEXT?             $(1))))
-?HANDLE-EXEEXT?              $(patsubst %$(EXEEXT),%,$(1)))))
+define am.test-suite.get-test-bases
+$(patsubst $(srcdir)/%,%,$(strip \
+  $(call am.util.strip-suffixes, $(TEST_EXTENSIONS), \
+  $(if $(EXEEXT),$(patsubst %$(EXEEXT),%,$1),$1))))
+endef
 
 am.test-suite.rx.recheck = ^[  ]*:recheck:[    ]*
 am.test-suite.rx.global-result = ^[    ]*:global-test-result:[         ]*
@@ -293,7 +292,7 @@ am__mostlyclean_files += $(am.test-suite.test-results) 
$(am.test-suite.test-logs
 # $(TEST_LOGS) is a published interface.
 TEST_LOGS = $(am.test-suite.test-logs)
 
-am.test-suite.workdir = $(am__dir)/test-harness
+am.test-suite.workdir = $(am.dir)/test-harness
 
 am.test-suite.append-to-list-of-bases = \
   @lst='$1'; for x in $$lst; do echo $$x; done \
@@ -310,6 +309,10 @@ define am.setup-test-harness-workdir
          && sed 's/$$/.trs/' $$workdir/bases > $$workdir/trs
 endef
 
+ifeq ($(call am.vars.is-undef,TEST_SUITE_LOG),yes)
+  TEST_SUITE_LOG = test-suite.log
+endif
+
 $(TEST_SUITE_LOG): $(am.test-suite.test-logs) $(am.test-suite.test-results)
        $(am.setup-test-harness-workdir)
        @set +e; $(am.test-suite.tty-colors); \
diff --git a/lib/am/serial-tests.am b/lib/am/serial-tests.am
index 592a796..3170c27 100644
--- a/lib/am/serial-tests.am
+++ b/lib/am/serial-tests.am
@@ -16,21 +16,23 @@
 
 ## Obsolescent serial testsuite driver.
 
-ifeq ($(am.conf.handle-exeext),yes)
+ifdef EXEEXT
 ## This is suboptimal, but we need to preserve the order of $(TESTS).
-am__check_cook_with_exeext_1 = \
+am.test-suite.cook-with-exeext.helper = \
     $(if $(filter $(am.all-progs), $1), $1$(EXEEXT), $1)
-am__check_cook_with_exeext = $(strip \
-  $(if $(EXEEXT), $(foreach t, $1, $(call $(0)_1, $t)), $1))
+am.test-suite.cook-with-exeext = \
+    $(strip $(foreach t, $1, $(call $0.helper, $t)))
 else
-am__check_cook_with_exeext = $(strip $1)
+am.test-suite.cook-with-exeext = $(strip $1)
 endif
 
 # TESTS can contain compiled programs, in which case we might have
 # to account for $(EXEEXT) appending.  For matching purposes, we
 # need to adjust XFAIL_TESTS as well.
-am__cooked_tests = $(call am__check_cook_with_exeext, $(TESTS))
-am__cooked_xfail_tests = $(call am__check_cook_with_exeext, $(XFAIL_TESTS))
+am__cooked_tests = \
+  $(call am.test-suite.cook-with-exeext, $(TESTS))
+am__cooked_xfail_tests = \
+  $(call am.test-suite.cook-with-exeext, $(XFAIL_TESTS))
 
 .PHONY: check-TESTS
 check-TESTS: $(am__cooked_tests)
@@ -44,90 +46,96 @@ check-TESTS: $(am__cooked_tests)
            *) return 1;; \
          esac; \
        }; \
-       if test -n "$$list"; then \
-         for tst in $$list; do \
-           if test -f ./$$tst; then dir=./; \
-           else dir="$(srcdir)/"; fi; \
-           if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
-## Success
-             all=`expr $$all + 1`; \
-             if is_xfail_test; then \
-               xpass=`expr $$xpass + 1`; \
-               failed=`expr $$failed + 1`; \
-               col=$$red; res=XPASS; \
-             else \
-               col=$$grn; res=PASS; \
-             fi; \
-           elif test $$? -ne 77; then \
-## Failure
-             all=`expr $$all + 1`; \
-             if is_xfail_test; then \
-               xfail=`expr $$xfail + 1`; \
-               col=$$lgn; res=XFAIL; \
-             else \
-               failed=`expr $$failed + 1`; \
-               col=$$red; res=FAIL; \
-             fi; \
+       test -n "$$list" || exit 0; \
+## Run the tests one by one in series, collecting their results.
+       for tst in $$list; do \
+         if test -f ./$$tst; then dir=./; \
+## For VPATH support.
+         else dir="$(srcdir)/"; fi; \
+         if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
+## Success.
+           all=`expr $$all + 1`; \
+           if is_xfail_test; then \
+             xpass=`expr $$xpass + 1`; \
+             failed=`expr $$failed + 1`; \
+             col=$$red; res=XPASS; \
            else \
-## Skipped
-             skip=`expr $$skip + 1`; \
-             col=$$blu; res=SKIP; \
+             col=$$grn; res=PASS; \
            fi; \
-           echo "$${col}$$res$${std}: $$tst"; \
-         done; \
-## Prepare the banner
-         if test "$$all" -eq 1; then \
-           tests="test"; \
-           All=""; \
-         else \
-           tests="tests"; \
-           All="All "; \
-         fi; \
-         if test "$$failed" -eq 0; then \
-           if test "$$xfail" -eq 0; then \
-             banner="$$All$$all $$tests passed"; \
+         elif test $$? -ne 77; then \
+## Failure.  Expected or unexpected?
+           all=`expr $$all + 1`; \
+           if is_xfail_test; then \
+## Expected failure (XFAIL).
+             xfail=`expr $$xfail + 1`; \
+             col=$$lgn; res=XFAIL; \
            else \
-             if test "$$xfail" -eq 1; then failures=failure; else 
failures=failures; fi; \
-             banner="$$All$$all $$tests behaved as expected ($$xfail expected 
$$failures)"; \
+## Unexpected failure (FAIL).
+             failed=`expr $$failed + 1`; \
+             col=$$red; res=FAIL; \
            fi; \
          else \
-           if test "$$xpass" -eq 0; then \
-             banner="$$failed of $$all $$tests failed"; \
-           else \
-             if test "$$xpass" -eq 1; then passes=pass; else passes=passes; 
fi; \
-             banner="$$failed of $$all $$tests did not behave as expected 
($$xpass unexpected $$passes)"; \
-           fi; \
+## Test skipped.
+           skip=`expr $$skip + 1`; \
+           col=$$blu; res=SKIP; \
          fi; \
-## DASHES should contain the largest line of the banner.
-         dashes="$$banner"; \
-         skipped=""; \
-         if test "$$skip" -ne 0; then \
-           if test "$$skip" -eq 1; then \
-             skipped="($$skip test was not run)"; \
-           else \
-             skipped="($$skip tests were not run)"; \
-           fi; \
-           test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
-             dashes="$$skipped"; \
+## Report this single result on stdout.
+         echo "$${col}$$res$${std}: $$tst"; \
+       done; \
+## Done running the tests.  Will now have to display the global
+## outcome, with proper formatting.
+## Let's start preparing the banner.
+       if test "$$all" -eq 1; then \
+         tests="test"; \
+         All=""; \
+       else \
+         tests="tests"; \
+         All="All "; \
+       fi; \
+       if test "$$failed" -eq 0; then \
+         if test "$$xfail" -eq 0; then \
+           banner="$$All$$all $$tests passed"; \
+         else \
+           if test "$$xfail" -eq 1; then failures=failure; else 
failures=failures; fi; \
+           banner="$$All$$all $$tests behaved as expected ($$xfail expected 
$$failures)"; \
          fi; \
-         report=""; \
-         if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
-           report="Please report to $(PACKAGE_BUGREPORT)"; \
-           test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
-             dashes="$$report"; \
+       else \
+         if test "$$xpass" -eq 0; then \
+           banner="$$failed of $$all $$tests failed"; \
+         else \
+           if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+           banner="$$failed of $$all $$tests did not behave as expected 
($$xpass unexpected $$passes)"; \
          fi; \
-         dashes=`echo "$$dashes" | sed s/./=/g`; \
-         if test "$$failed" -eq 0; then \
-           col="$$grn"; \
+       fi; \
+## DASHES should contain the largest line of the banner.
+       dashes="$$banner"; \
+       skipped=""; \
+       if test "$$skip" -ne 0; then \
+         if test "$$skip" -eq 1; then \
+           skipped="($$skip test was not run)"; \
          else \
-           col="$$red"; \
+           skipped="($$skip tests were not run)"; \
          fi; \
+         test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+           dashes="$$skipped"; \
+       fi; \
+       report=""; \
+       if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+         report="Please report to $(PACKAGE_BUGREPORT)"; \
+         test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+           dashes="$$report"; \
+       fi; \
+       dashes=`echo "$$dashes" | sed s/./=/g`; \
+       if test "$$failed" -eq 0; then \
+         col="$$grn"; \
+       else \
+         col="$$red"; \
+       fi; \
 ## Multi line coloring is problematic with "less -R", so we really need
 ## to color each line individually.
-         echo "$${col}$$dashes$${std}"; \
-         echo "$${col}$$banner$${std}"; \
-         test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
-         test -z "$$report" || echo "$${col}$$report$${std}"; \
-         echo "$${col}$$dashes$${std}"; \
-         test "$$failed" -eq 0; \
-       else :; fi
+       echo "$${col}$$dashes$${std}"; \
+       echo "$${col}$$banner$${std}"; \
+       test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+       test -z "$$report" || echo "$${col}$$report$${std}"; \
+       echo "$${col}$$dashes$${std}"; \
+       test "$$failed" -eq 0 || exit 1
diff --git a/runtest.in b/runtest.in
index c2c5d1f..3d01e68 100644
--- a/runtest.in
+++ b/runtest.in
@@ -27,6 +27,10 @@ set -e; set -u
 : ${abs_builddir='@abs_builddir@'}
 : ${PATH_SEPARATOR='@PATH_SEPARATOR@'}
 
+# If a test is called directly, it should be unconditionally run,
+# even it it's expensive.
+RUN_EXPENSIVE_TESTS=yes; export RUN_EXPENSIVE_TESTS
+
 # For sourcing of extra "shell libraries" by our test scripts.  As per
 # POSIX, sourcing a file with '.' will cause it to be looked up in $PATH
 # in case it is given with a relative name containing no slashes.
diff --git a/t/README b/t/README
index 570b667..ee063b4 100644
--- a/t/README
+++ b/t/README
@@ -8,10 +8,16 @@ User interface
 Running the tests
 -----------------
 
-  To run all tests:
+  To run (almost) all tests:
 
     make -k check
 
+  With the above, few tests (which are very time-consuming) will be skipped.
+  If you want to run them too, for extra coverage, you can use either of:
+
+    make -k check-expensive
+    make -k check RUN_EXPENSIVE_TESTS=yes
+
   By default, verbose output of a test 't/foo.sh' or 't/foo.tap' is retained
   in the log file 't/foo.log'.  Also, a summary log is created in the file
   'test-suite.log' (in the top-level directory).
diff --git a/t/am-dir.sh b/t/am-dir.sh
index fa101b3..3a09047 100755
--- a/t/am-dir.sh
+++ b/t/am-dir.sh
@@ -18,10 +18,10 @@
 # Check support for private automake working directory in builddir:
 #
 #  * internal variables:
-#      $(am__dir)
-#      $(am__abs_dir)
-#      $(am__top_dir)
-#      $(am__abs_top_dir)
+#      $(am.dir)
+#      $(am.dir.abs)
+#      $(am.top-dir)
+#      $(am.top-dir.abs)
 #
 #  * cleaning rules and "make distcheck" interaction.
 #
@@ -37,19 +37,19 @@ END
 
 cat > Makefile.am <<'END'
 SUBDIRS = . xsrc
-all-local: | $(am__dir)
+all-local: | $(am.dir)
 END
 
 mkdir xsrc
 cat >> xsrc/Makefile.am <<'END'
 subdir:
        mkdir $@
-all-local: | $(am__dir) subdir
-       : > $(am__dir)/sub
-       : > $(am__top_dir)/top
-       (cd ./subdir && : > $(am__abs_dir)/abs-sub)
+all-local: | $(am.dir) subdir
+       : > $(am.dir)/sub
+       : > $(am.top-dir)/top
+       (cd ./subdir && : > $(am.dir.abs)/abs-sub)
        rmdir subdir
-       (cd /tmp && : > $(am__abs_top_dir)/abs-top)
+       (cd /tmp && : > $(am.top-dir.abs)/abs-top)
 END
 
 sort > exp <<END
diff --git a/t/ax/test-lib.sh b/t/ax/test-lib.sh
index 6048f81..f6621d0 100644
--- a/t/ax/test-lib.sh
+++ b/t/ax/test-lib.sh
@@ -133,6 +133,13 @@ fi
 ##  Auxiliary shell functions.  ##
 ## ---------------------------- ##
 
+expensive_()
+{
+  if test x"$RUN_EXPENSIVE_TESTS" != x"yes"; then
+    skip_all_ 'expensive: disabled by default'
+  fi
+}
+
 # Tell whether we should keep the test directories around, even in
 # case of success.  By default, we don't.
 am_keeping_testdirs ()
diff --git a/t/dist-many.sh b/t/dist-many.sh
index 3fd0cb4..580d79a 100755
--- a/t/dist-many.sh
+++ b/t/dist-many.sh
@@ -21,6 +21,8 @@
 
 . ./defs || exit 1
 
+expensive_
+
 echo AC_OUTPUT >> configure.ac
 
 file=an-empty-file-with-a-long-name
diff --git a/t/parallel-tests-many.sh b/t/parallel-tests-many.sh
index bd107e2..70d9d23 100755
--- a/t/parallel-tests-many.sh
+++ b/t/parallel-tests-many.sh
@@ -20,6 +20,8 @@
 
 . ./defs || exit 1
 
+expensive_
+
 echo AC_OUTPUT >> configure.ac
 
 cat > Makefile.am << 'END'
diff --git a/t/testsuite-summary-count-many.sh 
b/t/testsuite-summary-count-many.sh
index 938c91e..55b2eb4 100755
--- a/t/testsuite-summary-count-many.sh
+++ b/t/testsuite-summary-count-many.sh
@@ -21,6 +21,8 @@
 
 . ./defs || exit 1
 
+expensive_
+
 for s in trivial-test-driver extract-testsuite-summary.pl; do
   cp "$am_testauxdir/$s" . || fatal_ "failed to fetch auxiliary script $s"
 done


hooks/post-receive
-- 
GNU Automake



reply via email to

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