]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Merge branch 'master' into ng/master
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 8 Jul 2012 07:59:11 +0000 (09:59 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 8 Jul 2012 07:59:11 +0000 (09:59 +0200)
* master:
  tests: move 'runtest' into the top-level directory
  cosmetics: rename t/ax/test-runner => t/ax/runtest
  fixup: another "make recheck" failure with BSD make
  test runner: work correctly in VPATH setups
  compat: automake should define $(mkdir_p), for backward compatibility
  coverage: test that AM_PROG_MKDIR_P and $(mkdir_p) still works
  tests init: don't automatically re-execute tests with a POSIX shell
  yacc tests: fix spurious failure with parallel make
  tests: ignore minor 'recheck' regression for BSD make
  tests: don't clutter the top-level dir with temporary test directories
  tests: avoid spurious failures when @MKDIR_P@ points to "install-sh -d"
  lisp: better support of VPATH builds
  news: fixlets and updates

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 files changed:
1  2 
.gitignore
Makefile.am
lib/am/header-vars.am
lib/am/lisp.am
lib/elisp-comp
t/README
t/self-check-dir.tap
t/tap-recheck.sh
t/test-driver-custom-multitest-recheck.sh
t/test-driver-custom-multitest-recheck2.sh
t/test-metadata-recheck.sh
t/yacc-deleted-headers.sh

diff --cc .gitignore
Simple merge
diff --cc Makefile.am
Simple merge
Simple merge
diff --cc lib/am/lisp.am
Simple merge
diff --cc lib/elisp-comp
Simple merge
diff --cc t/README
index b2dd870bb77786704c2c62b711da394353ea3548,25fd7353c07c22ccee69f382afb9660cba72313f..50feafacbd810ae4804991689bf694fc35fff7a5
+++ b/t/README
@@@ -66,48 -67,42 +66,41 @@@ Interpretatio
  About the tests
  ---------------
  
 -  There are two kinds of tests in the Automake testsuite (both implemented
 -  as shell scripts).  The scripts with the '.sh' suffix are "simple"
 -  tests, their outcome completely determined by their exit status.  Those
 -  with the '.tap' suffix use the TAP protocol.
 +  There are two kinds of tests in the Automake-NG testsuite (both
 +  implemented as shell scripts).  The scripts with the '.sh' suffix
 +  are "simple" tests, their outcome completely determined by their
 +  exit status.  Those with the '.tap' suffix use the TAP protocol.
-   If you want to run a test by hand, you can do so directly if it is
-   a simple test:
  
-     ./t/nogzip.sh
+   If you want to run a test by hand, you should be able to do so using the
+   'runtest' script provided in the Automake distribution:
  
-   (it will be verbose by default), while if it is a TAP test you can pass
-   it to your preferred TAP runner, as in e.g.:
+       ./runtest t/nogzip.sh
+       ./runtest t/add-missing.tap
  
-     prove --verbose --merge ./t/add-missing.tap
-   The tests can also be run directly in a VPATH build, as with:
-     /path/to/srcdir/t/nogzip.sh
-     prove --verbose --merge /path/to/srcdir/t/add-missing.tap
+   This will run the test using the correct shell, and should also work in
+   VPATH builds.  Note that, to run the TAP tests this way, you'll need to
+   have the prove(1) utility available in $PATH.
  
  
  Supported shells
  ----------------
  
-   By default, the tests are run by the $SHELL detected at configure
-   time.  They also take care to re-execute themselves with that shell,
-   unless told not to.  So, to run the tests with a different shell, say
-   '/path/to/another/sh', the user must use:
-     AM_TESTS_REEXEC=no /path/to/another/sh ./t/foo.sh
-     AM_TESTS_REEXEC=no prove -v -e /path/to/another/sh ./t/bar.tap
+   By default, the tests are run by a proper shell detected at configure
+   time.  Here is how you can run the tests with a different shell, say
+   '/bin/my-sh':
  
-   to run a test directly, and:
+     # Running through the makefile test driver.
 -    make check AM_TEST_RUNNER_SHELL=/bin/my-sh         (GNU make)
 -    AM_TEST_RUNNER_SHELL=/bin/my-sh make -e check      (non-GNU make)
++    make check AM_TEST_RUNNER_SHELL=/bin/my-sh
  
-     make check LOG_COMPILER=/path/to/sh
+     # Run a test directly from the command line.
+     AM_TEST_RUNNER_SHELL=/bin/my-sh ./t/ax/runtest t/foo.sh
  
-   to run the test(s) through the makefile test driver.
  
-   The test scripts are written with portability in mind, so that they
-   should run with any decent Bourne-compatible shell.  However, it is
-   worth nothing that older versions of Zsh (pre-4.3) exhibited several
-   bugs and incompatibilities with our uses, and are thus not supported
-   for running Automake's test scripts.
+   The test scripts are written with portability in mind, and should run
+   with any decent POSIX shell.  However, it is worth nothing that older
+   versions of Zsh (pre-4.3) exhibited several bugs and incompatibilities
+   with our uses, and are thus not supported for running Automake's test
+   scripts.
  
  
  Reporting failures
Simple merge
Simple merge
index a622c237f0908cc3d4a59619dbbb696708dc3a17,b6f543aee98767637cffe7972365a9b3a0a986e0..9e9610f768445e4f9308f7489c0283f82dbc0a1c
@@@ -92,16 -93,21 +92,17 @@@ for vpath in : false; d
  
    rm -f *.run
  
 -  : An empty '$(TESTS)' or '$(TEST_LOGS)' means that no test should be run.
 -  for var in TESTS TEST_LOGS; do
 -    env "$var=" $MAKE -e recheck >stdout || { cat stdout; exit 1; }
 -    cat stdout
 -    count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
 -    test ! -e a.run
 -    test ! -e b.run
 -    test ! -e c.run
 -  done
 -  unset var
 +  : An empty '$(TESTS)' means that no test should be run.
 +  $MAKE TESTS= recheck >stdout || { cat stdout; exit 1; }
 +  cat stdout
 +  count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
 +  test ! -e a.run
 +  test ! -e b.run
 +  test ! -e c.run
  
    : a.test was successful the first time, no need to re-run it.
 -  env TESTS=a.test $MAKE -e recheck >stdout \
 -    || { cat stdout; exit 1; }
+   using_gmake || $sleep # Required by BSD make.
 +  $MAKE TESTS=a.test recheck >stdout || { cat stdout; exit 1; }
    cat stdout
    count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
    test ! -e a.run
    test ! -e c.run
  
    : b.test failed, it should be re-run.  And make it pass this time.
+   using_gmake || $sleep # Required by BSD make.
    echo OK > b.ok
 -  TEST_LOGS=b.log $MAKE -e recheck >stdout \
 -    || { cat stdout; exit 1; }
 +  $MAKE TESTS=b recheck >stdout || { cat stdout; exit 1; }
    cat stdout
    test ! -e a.run
    test -f b.run
    rm -f *.run
  
    : No need to re-run a.test or b.test anymore.
 -  TEST_LOGS=b.log $MAKE -e recheck >stdout \
 -    || { cat stdout; exit 1; }
+   using_gmake || $sleep # Required by BSD make.
 +  $MAKE TESTS=b recheck >stdout || { cat stdout; exit 1; }
    cat stdout
    count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
    test ! -e a.run
    test ! -e b.run
    test ! -e c.run
 -  TESTS='a.test b.test' $MAKE -e recheck >stdout \
 -    || { cat stdout; exit 1; }
+   using_gmake || $sleep # Required by BSD make.
 +  $MAKE TESTS='a.test b.test' recheck >stdout || { cat stdout; exit 1; }
    cat stdout
    count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
    test ! -e a.run
    : c.test contained and hard error the last time, so it should be re-run.
    : This time, make it pass
    # Use 'echo', not ':'; see comments above for why.
+   using_gmake || $sleep # Required by BSD make.
    echo dummy > c.ok
 -  env TESTS='c.test a.test' $MAKE -e recheck >stdout \
 -    || { cat stdout; exit 1; }
 +  $MAKE TESTS='c.test a.test' recheck >stdout || { cat stdout; exit 1; }
    cat stdout
    count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
    test ! -e a.run
Simple merge
Simple merge