Merge branch 'maint'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 27 Oct 2012 12:23:40 +0000 (14:23 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 27 Oct 2012 12:23:40 +0000 (14:23 +0200)
* maint:
  tests: prepare to move ./defs to t/ax/test-init.sh

1  2 
Makefile.am
t/ac-output-old.tap

diff --combined Makefile.am
@@@ -135,6 -135,7 +135,6 @@@ dist_script_DATA = 
    lib/mdate-sh \
    lib/missing \
    lib/mkinstalldirs \
 -  lib/elisp-comp \
    lib/ylwrap \
    lib/depcomp \
    lib/compile \
@@@ -260,13 -261,14 +260,13 @@@ dist_automake_ac_DATA = 
    m4/ar-lib.m4 \
    m4/as.m4 \
    m4/auxdir.m4 \
 -  m4/ccstdc.m4 \
    m4/cond.m4 \
    m4/cond-if.m4 \
    m4/depend.m4 \
    m4/depout.m4 \
    m4/dmalloc.m4 \
 +  m4/extra-recurs.m4 \
    m4/gcj.m4 \
 -  m4/header.m4 \
    m4/init.m4 \
    m4/install-sh.m4 \
    m4/lead-dot.m4 \
    m4/minuso.m4 \
    m4/missing.m4 \
    m4/mkdirp.m4 \
 -  m4/obsol-gt.m4 \
 -  m4/obsol-lt.m4 \
 -  m4/obsolete.m4 \
    m4/options.m4 \
    m4/protos.m4 \
    m4/python.m4 \
@@@ -387,11 -392,6 +387,11 @@@ EXTRA_DIST += gen-testsuite-par
  $(generated_TESTS): $(srcdir)/gen-testsuite-part
  $(srcdir)/t/testsuite-part.am: $(srcdir)/gen-testsuite-part Makefile.am
  
 +# Hand-written tests for stuff in 'contrib/'.
 +include $(srcdir)/contrib/t/local.am
 +TESTS += $(contrib_TESTS)
 +EXTRA_DIST += $(contrib_TESTS)
 +
  # Static dependencies valid for each test case (also further
  # extended later).  Note that use 'noinst_' rather than 'check_'
  # as the prefix, because we really want them to be built by
@@@ -403,6 -403,7 +403,7 @@@ nodist_noinst_SCRIPTS = 
    t/wrap/automake-$(APIVERSION)
  
  dist_noinst_DATA = \
+   t/ax/test-init.sh \
    t/ax/test-lib.sh \
    t/ax/am-test-lib.sh \
    t/ax/tap-functions.sh
@@@ -484,7 -485,7 +485,7 @@@ check-local: check-tests-synta
  .PHONY: check-tests-syntax
  
  ## Checking the list of tests.
 -test_subdirs = t t/pm
 +test_subdirs = t t/pm contrib/t
  include $(srcdir)/t/CheckListOfTests.am
  
  # Run the testsuite with the installed aclocal and automake.
@@@ -504,16 -505,13 +505,16 @@@ EXTRA_DIST += $(perf_TESTS
  clean-local: clean-local-check
  .PHONY: clean-local-check
  clean-local-check:
 -      -set x t/*.dir; shift; \
 -       if test "$$#,$$1" = "1,*.dir"; then \
 -         : there is no test directory to clean; \
 -       else \
 -         find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
 -         rm -rf "$$@"; \
 -       fi;
 +## Directories candidate to be test directories match this wildcard.
 +      @globs='t/*.dir t/*/*.dir */t/*.dir */t/*/*.dir'; \
 +## The 'nullglob' bash option is not portable, so use perl.
 +      dirs=`$(PERL) -e "print join(' ', glob('$$globs'));"` || exit 1; \
 +      if test -n "$$dirs"; then \
 +## Errors in find are acceptable, errors in rm are not.
 +          find $$dirs -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
 +          echo " rm -rf $$dirs"; \
 +          rm -rf $$dirs || exit 1; \
 +      fi
  
  
  ## ---------------- ##
diff --combined t/ac-output-old.tap
  # line breaking in the use of AC_OUTPUT.  Synthesised by a bunch
  # of older tests (referenced below).
  
- . ./defs || exit 1
+ . test-init.sh
  
  plan_ 22
  
  rm -f configure.ac depcomp # Not required.
  
 -AUTOMAKE="$AUTOMAKE -Wno-obsolete"
 -
  # -----------------------------------------------------------------------
  
  # Test for bug reported by François Pinard.
@@@ -52,15 -54,18 +52,15 @@@ acoutbs_check (
  }
  
  acoutbs_check 1 << 'END'
 -AC_INIT
 -AM_INIT_AUTOMAKE(nonesuch, nonesuch)
 +AC_INIT([acoutbs1], [1.0])
 +AM_INIT_AUTOMAKE
  AC_OUTPUT(Makefile \
  zot)
  END
  
  acoutbs_check 2 << 'END'
 -AC_INIT
 -AM_INIT_AUTOMAKE(nonesuch, nonesuch)
 -AC_ARG_PROGRAM
 -AC_PROG_INSTALL
 -AC_PROG_MAKE_SET
 +AC_INIT([acoutbs2], [1.0])
 +AM_INIT_AUTOMAKE
  AC_OUTPUT(\
     Makefile \
     zot
@@@ -80,8 -85,8 +80,8 @@@ mkdir acoutno
  cd acoutnoq
  
  cat > configure.ac << 'END'
 -AC_INIT
 -AM_INIT_AUTOMAKE(nonesuch, nonesuch)
 +AC_INIT([acoutnoq], [1.0])
 +AM_INIT_AUTOMAKE
  AC_OUTPUT(Makefile, [true])
  END
  
@@@ -102,8 -107,8 +102,8 @@@ mkdir acoutp
  cd acoutpt
  
  cat > configure.ac << 'END'
 -AC_INIT
 -AM_INIT_AUTOMAKE(nonesuch, nonesuch)
 +AC_INIT([acoutpt], [1.0])
 +AM_INIT_AUTOMAKE
  AC_OUTPUT([Makefile], [true])
  END
  
@@@ -158,8 -163,8 +158,8 @@@ mkdir acoutqn
  cd acoutqnl
  
  cat > configure.ac << 'END'
 -AC_INIT
 -AM_INIT_AUTOMAKE(nonesuch, nonesuch)
 +AC_INIT([acoutqnl], [1.0])
 +AM_INIT_AUTOMAKE
  AC_OUTPUT([Makefile],
  [echo zardoz has spoken])
  END