]> git.ipfire.org Git - thirdparty/automake.git/log
thirdparty/automake.git
13 years ago[ng] refactor: read 'serial-tests.am' more verbatim
Stefano Lattarini [Fri, 27 Jul 2012 16:44:05 +0000 (18:44 +0200)] 
[ng] refactor: read 'serial-tests.am' more verbatim

* lib/am/serial-tests.am: Adjust to use the "ifeq" built-in and
the internal variable '$(am.conf.handle-exeext)' instead of the
transform '%?HANDLE-EXEEXT%'.
* automake.in (handle_tests): Use '&almost_verbatim' rather than
'&file_contents' to read and process 'serial-tests.am'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] check: use few more GNU make capabilities
Stefano Lattarini [Fri, 27 Jul 2012 14:33:08 +0000 (16:33 +0200)] 
[ng] check: use few more GNU make capabilities

We can do so now that the 'parallel-tests.am' file is now
processed "almost verbatim" by Automake.

* lib/am/parallel-tests.am (check-TESTS): Here, use "ifeq" to check
whether $(AM_LAZY_CHECK) is "yes".  This removes the need for ...
(am__remove_if_not_lazy_check): ... this variable, which has thus
been removed.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] check: prefer '#' over '##' for some comments
Stefano Lattarini [Fri, 27 Jul 2012 14:19:47 +0000 (16:19 +0200)] 
[ng] check: prefer '#' over '##' for some comments

* lib/am/parallel-tests.am: Here.  This will make it easier for someone
reading the generated Makefile.in to understand what is going on.

13 years ago[ng] cosmetics: remove a partly obsolete, partly redundant comment
Stefano Lattarini [Fri, 27 Jul 2012 14:13:01 +0000 (16:13 +0200)] 
[ng] cosmetics: remove a partly obsolete, partly redundant comment

* lib/am/parallel-tests.am (recheck): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] refactor: read 'parallel-tests.am' more verbatim
Stefano Lattarini [Fri, 27 Jul 2012 13:23:52 +0000 (15:23 +0200)] 
[ng] refactor: read 'parallel-tests.am' more verbatim

* automake.in (handle_tests): Process 'parallel-tests.am' with
'&almost_verbatim', not with '&file_contents'.  As a related
change, we now *must* include 'color-tests.am' explicitly.
* lib/am/parallel-tests.am: Related adjustments.  In particular,
remove use of explicit '!' verbatim-escaping of some sections,
and do not try to include 'color-tests.am'.
* lib/am/serial-tests.am: Do not include 'color-tests.am'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cosmetics: improve a comment
Stefano Lattarini [Fri, 27 Jul 2012 13:01:43 +0000 (15:01 +0200)] 
[ng] cosmetics: improve a comment

* lib/am/parallel-tests.am (am.test-suite.test-bases): About this variable.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__is_xfail_test -> -> am.test-suite.is-xfail
Stefano Lattarini [Fri, 27 Jul 2012 12:55:36 +0000 (14:55 +0200)] 
[ng] rename: am__is_xfail_test -> -> am.test-suite.is-xfail

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__test_* -> am.test-suite.test-*
Stefano Lattarini [Fri, 27 Jul 2012 12:54:23 +0000 (14:54 +0200)] 
[ng] rename: am__test_* -> am.test-suite.test-*

That is:

    am__test_bases    ->  am.test-suite.test-bases
    am__test_logs     ->  am.test-suite.test-logs
    am__test_results  ->  am.test-suite.test-results

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__xfail_test_bases -> am.test-suite.xfail-test-bases
Stefano Lattarini [Fri, 27 Jul 2012 12:46:38 +0000 (14:46 +0200)] 
[ng] rename: am__xfail_test_bases -> am.test-suite.xfail-test-bases

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__get_test_bases -> am.test-suite.get-test-bases
Stefano Lattarini [Fri, 27 Jul 2012 12:38:12 +0000 (14:38 +0200)] 
[ng] rename: am__get_test_bases -> am.test-suite.get-test-bases

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__count_test_result -> am.test-suite.count-results
Stefano Lattarini [Fri, 27 Jul 2012 12:33:55 +0000 (14:33 +0200)] 
[ng] rename: am__count_test_result -> am.test-suite.count-results

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__handle_per_suffix_test -> am.test-suite.handle-suffix
Stefano Lattarini [Fri, 27 Jul 2012 12:20:31 +0000 (14:20 +0200)] 
[ng] rename: am__handle_per_suffix_test -> am.test-suite.handle-suffix

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__runtest -> am.test-suite.runtest
Stefano Lattarini [Fri, 27 Jul 2012 12:18:17 +0000 (14:18 +0200)] 
[ng] rename: am__runtest -> am.test-suite.runtest

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cosmetics: update a couple of outdated references in comments
Stefano Lattarini [Fri, 27 Jul 2012 12:09:47 +0000 (14:09 +0200)] 
[ng] cosmetics: update a couple of outdated references in comments

* lib/tap-driver.pl, lib/test-driver: Here, about synchronization of
definition of ANSI color escapes with the relevant makefile fragments.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__tty_colors -> am.test-suite.tty-colors
Stefano Lattarini [Fri, 27 Jul 2012 12:04:24 +0000 (14:04 +0200)] 
[ng] rename: am__tty_colors -> am.test-suite.tty-colors

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__rst_title -> am.test-suite.rst-title
Stefano Lattarini [Fri, 27 Jul 2012 12:02:28 +0000 (14:02 +0200)] 
[ng] rename: am__rst_title -> am.test-suite.rst-title

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__create_global_log -> am.test-suite.create-global-log
Stefano Lattarini [Fri, 27 Jul 2012 12:00:54 +0000 (14:00 +0200)] 
[ng] rename: am__create_global_log -> am.test-suite.create-global-log

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am.test-harness.* -> am.test-suite.*
Stefano Lattarini [Fri, 27 Jul 2012 11:31:09 +0000 (13:31 +0200)] 
[ng] rename: am.test-harness.* -> am.test-suite.*

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__list_recheck_tests -> am.test-suite.list-tests-to-recheck
Stefano Lattarini [Fri, 27 Jul 2012 11:28:30 +0000 (13:28 +0200)] 
[ng] rename: am__list_recheck_tests -> am.test-suite.list-tests-to-recheck

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__list_recheck_tests -> am.test-suite-list-recheck
Stefano Lattarini [Fri, 27 Jul 2012 11:26:26 +0000 (13:26 +0200)] 
[ng] rename: am__list_recheck_tests -> am.test-suite-list-recheck

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__copy_in_global_log_rx -> am.test-suite.rx.copy-in-global-log
Stefano Lattarini [Fri, 27 Jul 2012 11:22:03 +0000 (13:22 +0200)] 
[ng] rename: am__copy_in_global_log_rx -> am.test-suite.rx.copy-in-global-log

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__global_test_result_rx -> am.test-suite.rx.global-result
Stefano Lattarini [Fri, 27 Jul 2012 11:18:13 +0000 (13:18 +0200)] 
[ng] rename: am__global_test_result_rx -> am.test-suite.rx.global-result

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__recheck_rx -> am.test-suite.rx.recheck
Stefano Lattarini [Fri, 27 Jul 2012 11:03:06 +0000 (13:03 +0200)] 
[ng] rename: am__recheck_rx -> am.test-suite.rx.recheck

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__test_result_rx -> am.test-suite.rx.result
Stefano Lattarini [Fri, 27 Jul 2012 11:01:39 +0000 (13:01 +0200)] 
[ng] rename: am__test_result_rx -> am.test-suite.rx.result

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] check: reduce code duplication in some auxiliary variables
Stefano Lattarini [Fri, 27 Jul 2012 10:08:01 +0000 (12:08 +0200)] 
[ng] check: reduce code duplication in some auxiliary variables

* lib/am/parallel-tests.am (am.test-suite.awk-trs-loop/BEGIN,
am.test-suite.awk-trs-loop/END, am.test-suite.awk-functions): New, hold
fragments of awk scripts extracted from (and common to) ...
(am__create_global_log, am__count_test_result): ... these variables.
Some related improvements to comments, and minor reformatting.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: fix a spurious failure
Stefano Lattarini [Fri, 27 Jul 2012 09:28:37 +0000 (11:28 +0200)] 
[ng] tests: fix a spurious failure

* t/override-conditional-1.sh: Here, due to the recent edits
of 'lib/am/header-vars.am'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cosmetics: fix some font-lock problems for vim
Stefano Lattarini [Fri, 27 Jul 2012 09:22:08 +0000 (11:22 +0200)] 
[ng] cosmetics: fix some font-lock problems for vim

* lib/am/parallel-tests.am: Here, by avoiding few occurrences of
the single-quote characters in comments.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] header vars: prefer '#' comments over '##' ones; improve few comments
Stefano Lattarini [Fri, 27 Jul 2012 09:13:26 +0000 (11:13 +0200)] 
[ng] header vars: prefer '#' comments over '##' ones; improve few comments

* lib/am/header-vars.am: Here, throughout the file.  This will make it
easier for someone reading the generated Makefile.in to understand what
it's going on.  And improve/fix few existing comments while at it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] header vars: fix comment on why DESTDIR is not explicitly initialized
Stefano Lattarini [Fri, 27 Jul 2012 08:38:49 +0000 (10:38 +0200)] 
[ng] header vars: fix comment on why DESTDIR is not explicitly initialized

* lib/am/header-vars.am (DESTDIR): It's because we want to allow it to
be defined from the environment, for compatibility with mainline Automake.
For better clarity, define an (empty) default with the line "DESTDIR ?=",
instead of with the commented-out definition "# DESTDIR=".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] vars: remove variable $(am__sh_e_setup)
Stefano Lattarini [Fri, 27 Jul 2012 08:32:58 +0000 (10:32 +0200)] 
[ng] vars: remove variable $(am__sh_e_setup)

The comments to that variable claimed that "set +e" in the shell was
an XSI extension, but the Automake testsuite since at least 1.11 (which
was run several times with some weak, non-POSIX vendor /bin/sh) used it
in the test script, with not problem whatsoever.  So we don't actually
need the safety net provided by $(am__sh_e_setup): we can simply use
'set +e' in the relevant recipes.

* lib/am/header-vars.am (am__sh_e_setup): Remove.
* lib/am/parallel-tests.am: Remove usages; simply inline 'set +e' instead.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] header vars: less use of @SUBST@ occurrences
Stefano Lattarini [Fri, 27 Jul 2012 08:24:28 +0000 (10:24 +0200)] 
[ng] header vars: less use of @SUBST@ occurrences

* lib/am/header-vars.am: Use $(PACKAGE) and $(srcdir) throughout
rather than @PACKAGE@ and @srcdir@.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] header vars: move check for GNU make version earlier
Stefano Lattarini [Fri, 27 Jul 2012 08:18:13 +0000 (10:18 +0200)] 
[ng] header vars: move check for GNU make version earlier

* lib/am/header-vars.am: Move the check that the version of GNU make
in use is modern enough before everything else.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] header vars: remove few old redundant variables
Stefano Lattarini [Fri, 27 Jul 2012 08:11:48 +0000 (10:11 +0200)] 
[ng] header vars: remove few old redundant variables

* lib/am/header-vars.am (target_triplet, host_triplet, build_triplet):
Remove these, redundant because aliases respectively for the variables
$(target), $(host) and $(build).  See also:
<http://lists.gnu.org/archive/html/automake/2012-07/msg00058.html>
* lib/am/dejagnu.am: Adjust.
* NG-NEWS: Update.
* doc/automake-ng.texi: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Thu, 26 Jul 2012 17:01:49 +0000 (19:01 +0200)] 
Merge branch 'master' into ng/master

* master: (39 commits)
  typofix: in a comment in Makefile.am
  maintcheck: fixup list of files in $(xdefs)
  tests: never source test-defs.sh directly, source test-lib.sh instead
  runtest: sanitize test environment
  tests: remove an obsolescent self test
  tests: "am_using_tap=yes" -> "am_test_protocol=tap"
  tests: protect test libs against multiple inclusion
  configure: testsuite shell can return early from "dot-sourced" files
  tests: move sanitization and "Bournification" in the generic test lib
  tests: source test defs in the generic test lib
  test defs: no need to re-add $srcdir/t/ax to $PATH
  tests: split test libs into "generic" and "automake-specific"
  test setup: move actual calling of testsuite setup in ./defs
  test setup: merge definitions of function for simple tests
  test init: refactor: new function 'am_test_setup'
  test init: refactor: move displaying of debugging info later
  test init: refactor: new function 'am_setup_testdir'
  test init: refactor: new function 'am_set_exit_traps'
  configure: testsuite shell set exit traps in shell functions
  test init: refactor: new function 'am_exit_trap'
  ...

+ Extra non-trivial edits:

* Makefile.am (perf_TESTS): Define here, as 't/list-of-tests.mk' is gone
in the 'ng/master' branch.
(all_TESTS): Don't list tests in 't/perf'; this reflects the removal of
$(perf_TESTS) from $(handwritten_TESTS) done in 't/list-of-tests.mk' on
the 'master' branch.

* t/depcomp-shuffle.sh: Source 'test-lib.sh', not './defs-static'.
Also, simply use:
    . depcomp-shuffle.sh
instead of:
    . "$am_testauxdir"/depcomp-shuffle.sh
to source the helper shell script 'depcomp-shuffle.sh'.  See recent
commit 'v1.12.2-49-g42fb45b' for a rationale.
* t/depcomp-shuffle-sub-vpath.sh: Likewise.
* t/depcomp-shuffle-sub.sh: Likewise.
* t/depcomp-shuffle-vpath.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotypofix: in a comment in Makefile.am
Stefano Lattarini [Thu, 26 Jul 2012 16:27:15 +0000 (18:27 +0200)] 
typofix: in a comment in Makefile.am

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Thu, 26 Jul 2012 16:16:47 +0000 (18:16 +0200)] 
Merge branch 'maint'

* maint: (38 commits)
  maintcheck: fixup list of files in $(xdefs)
  tests: never source test-defs.sh directly, source test-lib.sh instead
  runtest: sanitize test environment
  tests: remove an obsolescent self test
  tests: "am_using_tap=yes" -> "am_test_protocol=tap"
  tests: protect test libs against multiple inclusion
  configure: testsuite shell can return early from "dot-sourced" files
  tests: move sanitization and "Bournification" in the generic test lib
  tests: source test defs in the generic test lib
  test defs: no need to re-add $srcdir/t/ax to $PATH
  tests: split test libs into "generic" and "automake-specific"
  test setup: move actual calling of testsuite setup in ./defs
  test setup: merge definitions of function for simple tests
  test init: refactor: new function 'am_test_setup'
  test init: refactor: move displaying of debugging info later
  test init: refactor: new function 'am_setup_testdir'
  test init: refactor: new function 'am_set_exit_traps'
  configure: testsuite shell set exit traps in shell functions
  test init: refactor: new function 'am_exit_trap'
  test init: refactor: new function 'process_requirements'
  ...

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'testsuite-refactor' into maint
Stefano Lattarini [Thu, 26 Jul 2012 16:14:18 +0000 (18:14 +0200)] 
Merge branch 'testsuite-refactor' into maint

* testsuite-refactor: (33 commits)
  maintcheck: fixup list of files in $(xdefs)
  tests: never source test-defs.sh directly, source test-lib.sh instead
  runtest: sanitize test environment
  tests: remove an obsolescent self test
  tests: "am_using_tap=yes" -> "am_test_protocol=tap"
  tests: protect test libs against multiple inclusion
  configure: testsuite shell can return early from "dot-sourced" files
  tests: move sanitization and "Bournification" in the generic test lib
  tests: source test defs in the generic test lib
  test defs: no need to re-add $srcdir/t/ax to $PATH
  tests: split test libs into "generic" and "automake-specific"
  test setup: move actual calling of testsuite setup in ./defs
  test setup: merge definitions of function for simple tests
  test init: refactor: new function 'am_test_setup'
  test init: refactor: move displaying of debugging info later
  test init: refactor: new function 'am_setup_testdir'
  test init: refactor: new function 'am_set_exit_traps'
  configure: testsuite shell set exit traps in shell functions
  test init: refactor: new function 'am_exit_trap'
  test init: refactor: new function 'process_requirements'
  ...

13 years agoMerge branch 'fix-pr12041' into maint
Stefano Lattarini [Thu, 26 Jul 2012 16:07:17 +0000 (18:07 +0200)] 
Merge branch 'fix-pr12041' into maint

* fix-pr12041:
  tests: avoid spurious failure when running as root

13 years agomaintcheck: fixup list of files in $(xdefs)
Stefano Lattarini [Thu, 26 Jul 2012 12:16:42 +0000 (14:16 +0200)] 
maintcheck: fixup list of files in $(xdefs)

syntax-checks.mk (xdefs): Adjust to recent changes: add 't/ax/test-lib.sh'
and 't/ax/test-lib.sh', remove the now-deleted 't/ax/test-init.sh'

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: never source test-defs.sh directly, source test-lib.sh instead
Stefano Lattarini [Thu, 26 Jul 2012 10:50:32 +0000 (12:50 +0200)] 
tests: never source test-defs.sh directly, source test-lib.sh instead

After the recent re-organization, sourcing 'test-defs.sh' directly might
not work well and cause spurious failures or other unexpected behaviours.
We should source 'test-lib.sh' instead, which contains not more direct
code execution (only definition of shell variables/functions, or sourcing
of other '*.sh' with the same property), is protected against multiple
inclusions, and sources 'test-defs.sh' automatically in in a proper way.

* t/testsuite-summary-count.sh, t/tap-summary.sh, t/tap-summary-color.sh,
t/testsuite-summary-color.sh: Source 'test-lib.sh', not 'test-defs.sh'.
* gen-testsuite-part: Likewise, in the generated wrapper scripts.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoruntest: sanitize test environment
Stefano Lattarini [Thu, 26 Jul 2012 09:04:31 +0000 (11:04 +0200)] 
runtest: sanitize test environment

* runtest.in: Here, similarly to what is done by AM_TESTS_ENVIRONMENT
in Makefile.am, unset variables that should be under the complete control
of the test framework, and that could create havoc if inherited from the
environment.  This remove the need to check against possible environment
"pollution" ...
* t/ax/test-defs.in: ... in here.
* Makefile.am (AM_TESTS_ENVIRONMENT): Add a comment about the need of
synchronization with 'runtest.in'.
* t/self-check-env-sanitize.tap: Remove as obsolete.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: remove an obsolescent self test
Stefano Lattarini [Thu, 26 Jul 2012 08:45:43 +0000 (10:45 +0200)] 
tests: remove an obsolescent self test

* t/self-check-tap.sh: This.  The recent reorganization and code
moving between 'test-defs.sh' and 'test-lib.sh' has made it
brittle and prone to failures.  Since the usefulness of this self
check is extremely limited, it's not worth trying to fix it. Just
remove it.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: "am_using_tap=yes" -> "am_test_protocol=tap"
Stefano Lattarini [Thu, 26 Jul 2012 08:35:09 +0000 (10:35 +0200)] 
tests: "am_using_tap=yes" -> "am_test_protocol=tap"

And similarly, "am_using_tap=no" -> "am_test_protocol=none".

The new '$am_test_protocol' name is clearer, and will allow the easy
addition of further test protocols in the future.  This is not truly
relevant for automake, but we are trying to make some parts of our
testsuite framework as general as possible, in view of a future move
to a more generic project like Gnulib.

* Makefile.am, t/ax/am-test-lib.sh, t/ax/test-defs.in, t/ax/test-lib.sh,
t/self-check-env-sanitize.tap, t/self-check-tap.sh: Adjust.
* syntax-checks.mk (sc_tests_obsolete_variables): Add 'am_using_tap' to
the list of obsolete variables to check against.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: protect test libs against multiple inclusion
Stefano Lattarini [Thu, 26 Jul 2012 10:21:40 +0000 (12:21 +0200)] 
tests: protect test libs against multiple inclusion

* t/ax/test-lib.sh, t/ax/am-test-lib.sh: Return early if already sourced.
Use the witness variables '$test_lib_sourced' and '$am_test_lib_sourced',
respectively, for this purpose.
* runtest.in, Makefile.am (AM_TESTS_ENVIRONMENT): Unset 'test_lib_sourced'
and 'am_test_lib_sourced', to avoid interferences from the environment.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoconfigure: testsuite shell can return early from "dot-sourced" files
Stefano Lattarini [Wed, 25 Jul 2012 18:40:21 +0000 (20:40 +0200)] 
configure: testsuite shell can return early from "dot-sourced" files

* configure.ac: Check that the shell selected to run the test
scripts can call 'return' form within a file being sourced
with the '.' built-in.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: move sanitization and "Bournification" in the generic test lib
Stefano Lattarini [Thu, 26 Jul 2012 08:22:52 +0000 (10:22 +0200)] 
tests: move sanitization and "Bournification" in the generic test lib

* t/ax/test-defs.sh: From here ...
* t/ax/test-lib.sh: ... to here.  Also move the initialization of
'$argv0' and '$me'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: source test defs in the generic test lib
Stefano Lattarini [Thu, 26 Jul 2012 08:09:04 +0000 (10:09 +0200)] 
tests: source test defs in the generic test lib

* t/ax/test-lib.sh: That is, here ...
* defs: ... rather than here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotest defs: no need to re-add $srcdir/t/ax to $PATH
Stefano Lattarini [Thu, 26 Jul 2012 08:03:51 +0000 (10:03 +0200)] 
test defs: no need to re-add $srcdir/t/ax to $PATH

* t/ax/test-defs.sh: Here.  That is already done by both 'runtest' and
AM_TESTS_ENVIRONMENT, and the presence of '$srcdir/t/ax' in $PATH is
anyway required, after the recent changes, for our testsuite framework
to work at all.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: split test libs into "generic" and "automake-specific"
Stefano Lattarini [Wed, 25 Jul 2012 20:49:02 +0000 (22:49 +0200)] 
tests: split test libs into "generic" and "automake-specific"

This is the first step in the quest to merge the generically useful
parts of our test suite framework in a more generic project, like
Gnulib.  Time will tell if we'll succeed, and whether the success will
be worth the extra hassle.

* t/ax/test-init.sh: Split out ...
* t/ax/am-test-lib.sh, t/ax/test-lib.sh: ... into these two tests.
* defs, Makefile.am: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotest setup: move actual calling of testsuite setup in ./defs
Stefano Lattarini [Wed, 25 Jul 2012 19:12:30 +0000 (21:12 +0200)] 
test setup: move actual calling of testsuite setup in ./defs

* t/ax/test-init.sh: Move call to 'am_test_setup' ...
* defs: ... here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotest setup: merge definitions of function for simple tests
Stefano Lattarini [Wed, 25 Jul 2012 19:04:30 +0000 (21:04 +0200)] 
test setup: merge definitions of function for simple tests

* t/ax/plain-functions.sh: Delete, moving the definitions of ...
($stderr_fileno_): ... this variable ...
(warn_, fail_, skip_, skip_all_, fatal_, framework_failure_): ... and
these functions ...
* t/ax/test-init.sh: ... in here.  This allow us to use those functions
earlier in this file (instead of having to duplicate their behaviour
with inlined code).  The TAP-based tests are still able to override these
functions later to their TAP-enhanced equivalents when 'tap-functions.sh'
is sourced.
* Makefile.am (dist_noinst_DATA): Remove 't/ax/plain-functions.sh'.
* t/ax/tap-functions.sh: Adjust a comment.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotest init: refactor: new function 'am_test_setup'
Stefano Lattarini [Wed, 25 Jul 2012 18:31:47 +0000 (20:31 +0200)] 
test init: refactor: new function 'am_test_setup'

* t/ax/test-init.sh (am_test_setup): Here.
Call it from the main code.  Remove other calls of functions and
settings that are now duly called by 'am_test_setup'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotest init: refactor: move displaying of debugging info later
Stefano Lattarini [Wed, 25 Jul 2012 18:25:55 +0000 (20:25 +0200)] 
test init: refactor: move displaying of debugging info later

* t/ax/test-init.sh: Here, about the values of $PATH, $am_using_tap
and $am_running_installcheck.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotest init: refactor: new function 'am_setup_testdir'
Stefano Lattarini [Wed, 25 Jul 2012 18:20:09 +0000 (20:20 +0200)] 
test init: refactor: new function 'am_setup_testdir'

* t/ax/test-init.sh (am_setup_testdir): Here.
Use it instead of inlining its contents in the main code.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotest init: refactor: new function 'am_set_exit_traps'
Stefano Lattarini [Wed, 25 Jul 2012 18:17:46 +0000 (20:17 +0200)] 
test init: refactor: new function 'am_set_exit_traps'

* t/ax/test-init.sh (am_set_exit_traps): Here.
(trap): Use it instead of inlining the cleanup/finalization code.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoconfigure: testsuite shell set exit traps in shell functions
Stefano Lattarini [Wed, 25 Jul 2012 17:51:27 +0000 (19:51 +0200)] 
configure: testsuite shell set exit traps in shell functions

* configure.ac: Check that the shell selected to run the test
scripts can set an exit trap in a shell function, without having
that trap executed at the termination of the function rather
than of the scripts.  According to the Autoconf manual, at least
AUX 5.3 /bin/sh suffers of such a bug.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotest init: refactor: new function 'am_exit_trap'
Stefano Lattarini [Wed, 25 Jul 2012 17:45:31 +0000 (19:45 +0200)] 
test init: refactor: new function 'am_exit_trap'

* t/ax/test-init.sh (am_exit_trap): Here.
(trap): Use it instead of inlining the cleanup/finialization code.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotest init: refactor: new function 'process_requirements'
Stefano Lattarini [Wed, 25 Jul 2012 17:41:57 +0000 (19:41 +0200)] 
test init: refactor: new function 'process_requirements'

* t/ax/test-init.sh (process_requirements): Here.
Use it in to check that the tools in $required are present.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotest init: refactor: new function 'require_tool'
Stefano Lattarini [Wed, 25 Jul 2012 17:23:29 +0000 (19:23 +0200)] 
test init: refactor: new function 'require_tool'

* t/ax/test-init.sh (require_tool): Here.
Use it in the loop in the prerequisites in $required.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotest init: remove a couple of paranoid sanity checks
Stefano Lattarini [Wed, 25 Jul 2012 16:49:50 +0000 (18:49 +0200)] 
test init: remove a couple of paranoid sanity checks

* t/ax/test-init.sh: Here, about 'am_top_srcdir' and 'am_top_builddir';
the values of those variables are AC_SUBST'd, so it's nigh impossible
for the to be wrong or get "messed up".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: simplify sourcing of helper shell files
Stefano Lattarini [Wed, 25 Jul 2012 22:20:03 +0000 (00:20 +0200)] 
tests: simplify sourcing of helper shell files

Now that the early $PATH setup in both 'runtest' and AM_TESTS_ENVIRONMENT
allow the '.' built-in to find to-be-sourced shell scripts in the 't/ax/'
directory automatically, we can simplify several usages like:

   . "$am_testauxdir"/foo.sh

to just:

   . foo.sh

Also, because our test scripts run with the 'errexit' flag active, and
because POSIX mandates that, when the '.' built-in is used,

   ... if no readable file is found, a non-interactive shell shall abort ...

we can further simplify usages like:

    . "$am_testauxdir"/foo.sh || fatal_ "sourcing foo.sh"

once again to to just:

    . foo.sh

* ./defs, several tests: Adjusted.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotest defs: move in 't/ax/test-defs.sh'
Stefano Lattarini [Wed, 25 Jul 2012 16:14:23 +0000 (18:14 +0200)] 
test defs: move in 't/ax/test-defs.sh'

We can do so with minimal churn, now that the early setup of $PATH in
both 'runtest' and AM_TESTS_ENVIRONMENT allow the '.' built-in to find
to-be-sourced shell scripts in 't/ax' automatically, both in in-tree
and  VPATH builds.

With this change, we take another step forward a more rational and
"segregated" organization of our testsuite framework.

* defs-static.in: Rename ...
* t/ax/test-defs.in: ... like this, and adjust.
* Makefile.am, syntax-checks.mk, t/README, gen-testsuite-part,
t/tests-init.sh, t/ax/tap-setup.sh, t/tap-summary.sh, .gitignore,
t/testsuite-summary-color.sh, t/testsuite-summary-count.sh,
t/self-check-tap.sh, defs: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: update PATH early from AM_TESTS_ENVIRONMENT and runtest
Stefano Lattarini [Wed, 25 Jul 2012 21:06:06 +0000 (23:06 +0200)] 
tests: update PATH early from AM_TESTS_ENVIRONMENT and runtest

Because the POSIX standards mandate that sourcing a file with ". FILE"
will cause FILE (assuming it is a relative containing no slashes) to be
looked for in PATH, such a move will allow us to simplify our sourcing
of shell testing libraries like (currently) 't/ax/test-init.sh' and
'defs', and to modularize and re-organize them better in the feature,
with minimal churn.

* runtest.in, Makefile.am (AM_TEST_ENVIRONMENT): Prepend $(abs_srcdir)/t/ax
and $(abs_builddir)/t/ax (in that order) to PATH; do so avoiding repetition
in the common case of non-VPATH builds.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoruntest: export $srcdir for use by the test scripts
Stefano Lattarini [Wed, 25 Jul 2012 11:30:05 +0000 (13:30 +0200)] 
runtest: export $srcdir for use by the test scripts

This is mostly a preparatory change in view of future ones.  But it
also make the behaviour of runtest more similar to that of the test
harness used by "make check".

* runtest.in: Export srcdir (was already defined to '@srcdir@').

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agogen-tests: $testdir/ax -> $testauxdir
Stefano Lattarini [Wed, 25 Jul 2012 20:06:12 +0000 (22:06 +0200)] 
gen-tests: $testdir/ax -> $testauxdir

* gen-testsuite-part ($testauxdir): New, defined to "$testdir/ax".
Use it throughout, for better encapsulation and less duplication.
($auxdir): Remove as unneeded.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agogen-tests: less hard-coding of 't' as the test directory
Stefano Lattarini [Wed, 25 Jul 2012 13:55:57 +0000 (15:55 +0200)] 
gen-tests: less hard-coding of 't' as the test directory

This will make life easier for us in case we decide to rename the
testsuite directory in the future (perhaps to something like 'tests',
which is somewhat less cryptic than the current 't').

* gen-testsuite-part ($testdir): New variable, used throughout instead
of hard-coding the name of the test directory to 't'.
All the script adjusted to make proper use of '$testdir'.
($auxdir): Move its definition earlier, for consistency with the one
of '$testdir'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agobuild: auxiliary testsuite files/scripts built by "make all"
Stefano Lattarini [Wed, 25 Jul 2012 14:31:17 +0000 (16:31 +0200)] 
build: auxiliary testsuite files/scripts built by "make all"

This will allow the developers to run a tests case by hand out of
a newly extracted tarball simply doing:

    $ ./configure && make
    $ ./runtest t/the-test-case.sh

while before this change one has to resort to:

    $ ./configure && make && make check TESTS=
    $ ./runtest t/the-test-case.sh

or, with some non-GNU makes, even:

    $ ./configure && make && make check TESTS= AM_MAKEFLAGS="TESTS="
    $ ./runtest t/the-test-case.sh

This come very handy sometimes, especially when doing one-shot
debugging.  Admittedly not a big deal, but one less friction in
the build system is always nice.

* Makefile.am (check_SCRIPTS, dist_check_DATA, nodist_check_DATA):
Move their content to ...
(noinst_SCRIPTS, dist_noinst_DATA, nodist_noinst_DATA): ... these
variables.
Adjust comments.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoperf tests: reorganize
Stefano Lattarini [Wed, 25 Jul 2012 17:06:22 +0000 (19:06 +0200)] 
perf tests: reorganize

* t/list-of-tests.mk (handwritten_TESTS): Don't list ($perf_TESTS) in
here anymore.
* Makefile.am (EXTRA_DIST): Add them explicitly.
(perf): New target, run the performance tests and save the logs of
the ones with unexpected results in the file 't/perf/test-suite.log',
which is thus ...
(PERF_TEST_SUITE_LOG): ... defined in this variable ...
(CLEANFILES): ... and added to this.
(test_subdirs): Remove 't/perf': the tests in there are no more
listed in $(TESTS).
* t/ax/test-init.sh: Don't explicitly skip "perf" test here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoruntest: pass *all* the given shell options to the test invocation
Stefano Lattarini [Thu, 26 Jul 2012 09:41:51 +0000 (11:41 +0200)] 
runtest: pass *all* the given shell options to the test invocation

* runtest.in: Here.  This didn't work previously because, in our
option parsing loop, we were mistakenly redefining '$shell_opts'
each time, instead of appending to it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoruntest: correctly pass shell option also for TAP tests
Stefano Lattarini [Thu, 26 Jul 2012 09:40:53 +0000 (11:40 +0200)] 
runtest: correctly pass shell option also for TAP tests

* runtest.in: Here.  This required code refactoring not
completely trivial.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocosmetics: remove leftover comment fragment from runtest.in
Stefano Lattarini [Wed, 25 Jul 2012 17:11:40 +0000 (19:11 +0200)] 
cosmetics: remove leftover comment fragment from runtest.in

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotest defs: improve a comment
Stefano Lattarini [Wed, 25 Jul 2012 11:16:59 +0000 (13:16 +0200)] 
test defs: improve a comment

* defs-static.in: Here, about the unsetting of CDPATH.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotest defs: remove obsolete comment
Stefano Lattarini [Wed, 25 Jul 2012 11:14:48 +0000 (13:14 +0200)] 
test defs: remove obsolete comment

* defs-static.in: Here: do not state anymore that this file should execute
correctly with any system's /bin/sh shell, as this is not true anymore: the
testsuite assumes a POSIX shell throughout these days.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoruntest: support option --shell, tell which shell should run the test
Stefano Lattarini [Wed, 25 Jul 2012 11:03:17 +0000 (13:03 +0200)] 
runtest: support option --shell, tell which shell should run the test

* runtest.in: Here.  The same effect could have been obtained by
exporting AM_TEST_RUNNER_SHELL to the desired value, but the new
API is simpler and requires less typing and less thinking.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoruntest: support passing options over to the shell
Stefano Lattarini [Wed, 25 Jul 2012 10:56:43 +0000 (12:56 +0200)] 
runtest: support passing options over to the shell

* runtest.in: Here.  Also, support '--help' to display a nice
help screen.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: avoid spurious failure when running as root
Stefano Lattarini [Wed, 25 Jul 2012 10:40:10 +0000 (12:40 +0200)] 
tests: avoid spurious failure when running as root

Fixes automake bug#12041.

* t/primary-prefix-couples-force-valid.sh: If run as root, don't expect
a "test -x" on a non-executable files to fail: for root, all files are
executable (as well as readable and writable), and at least on Solaris
10 that causes "test -x" to succeed also on non-executable files.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: fix spurious failure in 'color-tests2.sh'
Stefano Lattarini [Tue, 24 Jul 2012 22:30:22 +0000 (00:30 +0200)] 
[ng] tests: fix spurious failure in 'color-tests2.sh'

* t/color-tests2.sh: Change the idioms used to specify the value of
'AM_COLOR_TESTS' to make.  This is required since, in contrast with
what happens in the mainline Automake counterpart, this script doesn't
invoke make with the '-e' option.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Tue, 24 Jul 2012 22:14:09 +0000 (00:14 +0200)] 
Merge branch 'master' into ng/master

* master:
  tests: avoid non-textual output in a '.log' file
  tags: refactor to reduce code duplication (2)
  tags: refactor to reduce code duplication (1)
  tests: better name for a couple of tests
  check: support colorized testsuite output by default
  tags: unify recursion for tags targets with that of "usual" targets

+ Extra non-trivial edits:

* automake.in (handle_tests): Drop the '%COLOR%' transform in the
processing of both 'serial-tests.am' and 'parallel-tests.am', which
have superseded the 'check.am' from mainline Automake.
* lib/am/color-tests.am: Remove use of the '%?COLOR%' transform;
just act as if it were unconditionally TRUE.
(am__tty_colors_dummy): Merge into ...
(am__tty_colors): ... this.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Tue, 24 Jul 2012 21:51:44 +0000 (23:51 +0200)] 
Merge branch 'maint'

* maint:
  tests: avoid non-textual output in a '.log' file

13 years agotests: avoid non-textual output in a '.log' file
Stefano Lattarini [Tue, 24 Jul 2012 20:56:01 +0000 (22:56 +0200)] 
tests: avoid non-textual output in a '.log' file

* t/dist-formats.tap: Here.  Otherwise, some inferior awk implementations,
like OpenIndiana /usr/xpg4/bin/awk, could be confused and cause spurious
errors in the testsuite harness.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotags: refactor to reduce code duplication (2)
Stefano Lattarini [Tue, 24 Jul 2012 17:58:45 +0000 (19:58 +0200)] 
tags: refactor to reduce code duplication (2)

No semantic change is intended.

* lib/am/tags.am (am__define_uniq_tagged_files): New variable,
factor out some code common to ...
(ctags-am, tags-am, ID): ... the recipes of these targets.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotags: refactor to reduce code duplication (1)
Stefano Lattarini [Tue, 24 Jul 2012 17:25:02 +0000 (19:25 +0200)] 
tags: refactor to reduce code duplication (1)

No semantic change is intended.

* lib/am/tags.am (am__uniquify_input): New variable, factor
out some code common to ...
(ctags-am, tags-am, ID): ... the recipes of these targets.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branches 'tags-simplify-recursion' and 'color-tests-always'
Stefano Lattarini [Tue, 24 Jul 2012 16:43:50 +0000 (18:43 +0200)] 
Merge branches 'tags-simplify-recursion' and 'color-tests-always'

* tags-simplify-recursion:
  tags: unify recursion for tags targets with that of "usual" targets

* color-tests-always:
  tests: better name for a couple of tests
  check: support colorized testsuite output by default

13 years ago[ng] rename: am__memoized_value/* -> am.memoize.value/*
Stefano Lattarini [Tue, 24 Jul 2012 14:38:22 +0000 (16:38 +0200)] 
[ng] rename: am__memoized_value/* -> am.memoize.value/*

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cosmetics: move a variable definition
Stefano Lattarini [Tue, 24 Jul 2012 14:36:34 +0000 (16:36 +0200)] 
[ng] cosmetics: move a variable definition

* lib/am/header-vars.am (am.chars.empty): This, move earlier.  This both
fixes the associated comments (which referred to a variable defined above
it as "defined below"), and ensures that this variable is not used before
being defined (not a big deal in practice, since it expands to empty; but
better be consistent).

Reported by Akim Demaille.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: run two slow tests earlier, for better "make -j" performance
Stefano Lattarini [Tue, 24 Jul 2012 13:52:38 +0000 (15:52 +0200)] 
[ng] tests: run two slow tests earlier, for better "make -j" performance

* Makefile.am (long_running_TESTS): Add 't/parallel-tests-many.sh' and
't/dist-many.sh', which are slooow.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] vars: names of iterating vars in $(foreach) loops shorter & simpler
Stefano Lattarini [Tue, 24 Jul 2012 13:23:08 +0000 (15:23 +0200)] 
[ng] vars: names of iterating vars in $(foreach) loops shorter & simpler

In GNU make, after a "$(foreach x,...)" loop, the make variable $(x):

  - is restored to its original variable it had before the 'foreach'
    loop, if it was already set;

  - re-unset otherwise.

This behaviour is checked by the recent spy test 't/spy-foreach.sh'.

This means that, in most situations, there's no actual need to use
a "namespace safe" variable name for the iterating variable in a
"$(foreach ...)" loop, because that variable won't linger in the
environment after the loop anyway.

* lib/am/compile.am, lib/am/header-vars.am, lib/am/parallel-tests.am,
lib/am/serial-tests.am: Adjust to use simpler variables names in their
foreach loops; for example, simply 'v' instead of 'am__v', etc.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] spy: iteration variables in "$(foreach ...)" loops are temporary
Stefano Lattarini [Tue, 24 Jul 2012 13:05:14 +0000 (15:05 +0200)] 
[ng] spy: iteration variables in "$(foreach ...)" loops are temporary

* t/spy-foreach.sh: New test.  Check that, after a "$(foreach x,...)"
loop, the make variable $(x) is:
  - restored to the original variable it had before the 'foreach'
    loop, if it was already set; and
  - is re-unset otherwise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: .am.* -> am.*
Stefano Lattarini [Tue, 24 Jul 2012 12:34:58 +0000 (14:34 +0200)] 
[ng] rename: .am.* -> am.*

This is the complete list of renames done in this patch:

    .am.clean-cmd.f  ->  am.clean-cmd.f
    .am.clean-cmd.d  ->  am.clean-cmd.d
    .am.rm-f         ->  am.rm-f
    .am.rm-rf        ->  am.rm-rf

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__memoize -> am.memoize
Stefano Lattarini [Tue, 24 Jul 2012 10:00:02 +0000 (12:00 +0200)] 
[ng] rename: am__memoize -> am.memoize

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__newline -> am.chars.newline
Stefano Lattarini [Tue, 24 Jul 2012 09:58:33 +0000 (11:58 +0200)] 
[ng] rename: am__newline -> am.chars.newline

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cosmetics: fix botches spaces in t/memoize.tap
Stefano Lattarini [Mon, 23 Jul 2012 18:12:17 +0000 (20:12 +0200)] 
[ng] cosmetics: fix botches spaces in t/memoize.tap

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: fix test driver botch-up on Solaris
Stefano Lattarini [Mon, 23 Jul 2012 14:57:00 +0000 (16:57 +0200)] 
[ng] tests: fix test driver botch-up on Solaris

This issue is very similar to the one fixed by commit v1.12.2-31-g587e0c6.

The test 't/memoize.sh' was producing a '.log' file with few overly-long
lines (more than 12k characters long) and, when Solaris XPG4 awk was in
use, that was causing the 'test-driver.sh' script to experience a spurious
failure:

    /usr/xpg4/bin/awk: line 382 (B): Record too long (LIMIT: 19999 bytes)
    tap-driver.sh: fatal: I/O or internal error

* t/memoize.sh: Temporary disable shell tracing and make output in a few
places, to prevent the resulting '.log' file to contain overly long lines.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: relax even more a grepping check on configure output
Stefano Lattarini [Mon, 23 Jul 2012 18:09:08 +0000 (20:09 +0200)] 
[ng] tests: relax even more a grepping check on configure output

This is a follow-up to today's commit v1.12.2-594-geee3aff.

* t/subpkg.sh: Here: don't be too picky about the verb declension
used in a "checking whether" message.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Mon, 23 Jul 2012 14:27:22 +0000 (16:27 +0200)] 
Merge branch 'master' into ng/master

* master:
  tests: avoid a spurious failure with Solaris /bin/sh
  tests: fix buglet in t/missing3.sh
  self tests: avoid spurious failures on older bash
  tests: remove t/parallel-tests-many.sh (fixes spurious failure)
  typofix: in a comment in the automake script
  news: minor fixlets and reordering

+ Extra non-trivial edits:

* t/parallel-tests-many.sh: Do not deleted; keep the correct and
improved version from the 'ng/master' branch.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: relax a grepping check on configure output
Stefano Lattarini [Mon, 23 Jul 2012 14:20:49 +0000 (16:20 +0200)] 
tests: relax a grepping check on configure output

* t/subpkg.sh: Here: do not expect the C compiler to be simply
named 'cc'.  This was causing spurious failures when $CC was
overridden at configure time or though config.site.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'ng/many-tests' into ng/master
Stefano Lattarini [Mon, 23 Jul 2012 12:47:05 +0000 (14:47 +0200)] 
Merge branch 'ng/many-tests' into ng/master

* ng/many-tests:
  [ng] check: in recipes, don't use pipe when redirection suffices
  [ng] recheck: don't exceed command line limits, even with many failed tests
  [ng] coverage: recheck with many failed tests
  [ng] check: refactor for less duplication and better performances
  [ng] check: use awk rather than grep+xargs to count test results
  [ng] parallel-tests: do not exceed command line length limits
  [ng] coverage: testing with lots of test scripts

13 years agotests: avoid a spurious failure with Solaris /bin/sh
Stefano Lattarini [Mon, 23 Jul 2012 11:35:28 +0000 (13:35 +0200)] 
tests: avoid a spurious failure with Solaris /bin/sh

The /bin/sh shell on Solaris is dumb enough not to set the exit
status to 127 after the execution of a non-existing command is
attempted:

  $ /bin/sh -c 'nonesuch'; echo stat = $?
  /bin/sh: nonesuch: not found
  stat = 1

This means that the missing script, when run through that shell,
cannot discriminate between a real failure of a maintainer tool
and a failure due to its absence.  This is not a big deal in
practice (especially because all the 'missing' invocations in
our Makefiles are done with $(SHELL), and that is almost surely
set by configure to a proper POSIX shell), but was causing an
annoying failure in our testsuite.  Fix it.

* t/missing3.sh: If 'missing' is run with a /bin/sh shell suffering
from the just-described bug, skip the check that would spuriously
fail due to that bug.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: fix buglet in t/missing3.sh
Stefano Lattarini [Mon, 23 Jul 2012 11:15:13 +0000 (13:15 +0200)] 
tests: fix buglet in t/missing3.sh

* t/missing3.sh: Be sure to use 'run_cmd' also in the first invocation
of 'missing', to ensure the stderr will actually be saved in a file we
can later grep.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] news: remove duplicated header
Stefano Lattarini [Mon, 23 Jul 2012 10:28:16 +0000 (12:28 +0200)] 
[ng] news: remove duplicated header

* NG-NEWS (Obsolete Features Removed): This.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>