]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Merge branch 'python-tests-extend'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 10 Feb 2011 09:13:59 +0000 (10:13 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 10 Feb 2011 09:13:59 +0000 (10:13 +0100)
Conflicts:
tests/Makefile.am
tests/Makefile.in
tests/python11.test
tests/python2.test
tests/python8.test
tests/python9.test

20 files changed:
1  2 
ChangeLog
doc/automake.texi
tests/Makefile.am
tests/Makefile.in
tests/instdir-ltlib.test
tests/instdir-prog.test
tests/lflags.test
tests/lflags2.test
tests/nobase-python.test
tests/python.test
tests/python10.test
tests/python11.test
tests/python2.test
tests/python3.test
tests/python4.test
tests/python5.test
tests/python6.test
tests/python7.test
tests/python8.test
tests/python9.test

diff --cc ChangeLog
index 18567c69a894205f43b9a09dd8fca3830da150c5,0df8d8e08daf051d6da41eff967153065f69f469..99f37cbd9cf4fe860f659dcd2b84e55ce57f7af6
+++ b/ChangeLog
@@@ -1,3 -1,88 +1,80 @@@
 -2011-01-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 -
 -      tests: avoid instspc.test failures due to make's whitespace trimming
 -      * tests/instspc.test: Prepend './' when passing the test
 -      characters, to avoid leading whitespace characters to be trimmed
 -      from macros set from environment variables.  Fixes testsuite
 -      failures with HP-UX, IRIX, and Tru64/OSF make.
 -
+ 2011-02-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       python: extend and improve tests, fix minor glitches
+       * m4/python.m4 (AM_PATH_PYTHON): Ensure the "checking ..." messages
+       from configure are always complete, even in case of failure.  Tiny
+       cosmetic improvement in info/error messages.
+       * tests/python.test: Also check that automake complains if the
+       PYTHON primary is used but the `py-compile' script is not present.
+       Make grepping of generated Makefile.in laxer w.r.t. whitespace.
+       Add trailing `:' command.
+       * tests/python2.test: Remove repeated calls aclocal: they are
+       useless because configure.in is never modified.  Make grepping
+       of automake stderr more comprehensive.  Remove the pre-existing
+       `py-compile' file before trying to install it with `--add-missing'.
+       Add trailing `:' command.
+       * tests/python3.test: Add trailing `:' command.
+       * tests/python11.test: Likewise.
+       * tests/python4.test: Likewise.  Also, try to pass PYTHON config
+       variable to configure from the environment, rather than only from
+       the command line.
+       * tests/python5.test: Ensure that the "checking ..." messages from
+       configure are always complete.  Use proper m4 quoting.  Add a
+       trailing `:' command.
+       * tests/python6.test: Simplify test logic, by checking for files
+       created by configure rather then grepping its output.
+       * tests/python7.test: Likewise.
+       * tests/python8.test: Also check that `$PYTHON' is meaningfully
+       set in the ACTION-IF-TRUE argument of AM_PATH_PYTHON.
+       * tests/python9.test: Likewise.
+       * tests/python10.test: Add trailing `:' command.
+       (Makefile.am): Declare `disttest' target as `.PHONY', and add
+       an `ls -l' to its recipe, for debugging.
+       * tests/nobase-python.test: In testing "make uninstall" and
+       "make install" results, prefer idioms that make verbose logs
+       more helpful.  Remove a couple of lines of dead code.  Add a
+       trailing `:' command.
+       * tests/python5b.test: New test, checking that configure performs
+       the check on the python version even when the choice of the python
+       interpreter is forced by the user.
+       * tests/python-dist.test: New test, checking the distribution of
+       *_PYTHON files.
+       * tests/python-vars.test: New test, checking that AM_PATH_PYTHON
+       correctly set all the output variables advertised in the manual.
+       * tests/python-virtualenv.test: New test, checking that python
+       support offered by automake works well with "virtual python
+       environments" created by the `virtualenv' program.
+       * tests/instdir-prog.test: Also check `$(pyexecdir)'.  Existing
+       checks made slightly stricter.
+       * tests/instdir-prog.test: Also check `$(pyexecdir)'.  Existing
+       * tests/instdir-ltlib.test: Likewise.
+       * tests/Makefile.am (TESTS): Update.
+ 2011-02-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       coverage: more tests on simple and parallel test drivers
+       * tests/parallel-tests-subdir.test: New test.
+       * tests/check-exported-srcdir.test: Likewise.
+       * tests/check-tests-in-builddir.test: Likewise.
+       * tests/check-tests_environment.test: Likewise.
+       * tests/Makefile.am (TESTS): Update.
+ 2011-01-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       tests: fix spurious failures in lflags*.test
+       * tests/lflags.test: Remove 'LEX' from the environment, so
+       that it won't be erroneously picked up by `make -e'.
+       * tests/lflags2.test: Likewise.
+ 2011-01-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       docs: color-tests issues with parallel make
+       * doc/automake.texi (Simple Tests): Document that automatic
+       recognition of a capable terminal attached to stdout can fail
+       with some make implementation when running in parallel mode,
+       thus causing colored test output not to be automatically
+       activated when it should.
  2011-01-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
  
        coverage: test semantics of "dummy" per-target flags
Simple merge
index f53a1f35049aac32e96e88c42148b31f941ed44a,624d5b0d9563f0b55f27d41c7a3838ec6226b642..2b5909d4995a4e2f5be59c2d411725b8a58f16b0
@@@ -216,7 -141,9 +216,10 @@@ check8.test 
  check9.test \
  check10.test \
  check11.test \
 +check12.test \
+ check-exported-srcdir.test \
+ check-tests-in-builddir.test \
+ check-tests_environment.test \
  checkall.test \
  clean.test \
  clean2.test \
index b78e5a5808d130e942e50e19ad65b41efe382e55,5a039b48c6f9ffbbed39d38cd047b019bc1458c6..1e903f4fbfe785a0c7eabb8fa35ab7f8b045b10d
@@@ -281,82 -272,42 +281,84 @@@ target_alias = @target_alias
  top_build_prefix = @top_build_prefix@
  top_builddir = @top_builddir@
  top_srcdir = @top_srcdir@
 -XFAIL_TESTS = \
 -all.test \
 -auxdir2.test \
 -cond17.test \
 -gcj6.test \
 -txinfo5.test
 -
 -parallel_tests = \
 -check-exported-srcdir-p.test \
 -check-tests-in-builddir-p.test \
 -check-tests_environment-p.test \
 -check-p.test \
 -check10-p.test \
 -check11-p.test \
 -check2-p.test \
 -check3-p.test \
 -check4-p.test \
 -check5-p.test \
 -check6-p.test \
 -check7-p.test \
 -check8-p.test \
 -check9-p.test \
 -color-p.test \
 -color2-p.test \
 -comment9-p.test \
 -dejagnu-p.test \
 -exeext4-p.test \
 -maken3-p.test \
 -maken4-p.test \
 -pr401-p.test \
 -pr401b-p.test \
 -pr401c-p.test
 -
 -MAINTAINERCLEANFILES = $(parallel_tests)
 +MAINTAINERCLEANFILES = $(parallel_tests) $(instspc_tests)
 +EXTRA_DIST = ChangeLog-old gen-parallel-tests instspc-tests.sh \
 +      $(TESTS)
 +XFAIL_TESTS = all.test auxdir2.test cond17.test gcj6.test \
 +      override-conditional-2.test txinfo5.test \
 +      $(instspc_xfail_tests)
- parallel_tests = backcompat5-p.test check-p.test check10-p.test \
-       check11-p.test check12-p.test check2-p.test check3-p.test \
-       check4-p.test check5-p.test check6-p.test check7-p.test \
-       check8-p.test check9-p.test color-p.test color2-p.test \
-       comment9-p.test dejagnu-p.test exeext4-p.test maken3-p.test \
-       maken4-p.test posixsubst-tests-p.test pr401-p.test \
-       pr401b-p.test pr401c-p.test
++parallel_tests = backcompat5-p.test check-exported-srcdir-p.test \
++      check-tests-in-builddir-p.test check-tests_environment-p.test \
++      check-p.test check10-p.test check11-p.test check12-p.test \
++      check2-p.test check3-p.test check4-p.test check5-p.test \
++      check6-p.test check7-p.test check8-p.test check9-p.test \
++      color-p.test color2-p.test comment9-p.test dejagnu-p.test \
++      exeext4-p.test maken3-p.test maken4-p.test \
++      posixsubst-tests-p.test pr401-p.test pr401b-p.test \
++      pr401c-p.test
 +instspc_tests = instspc-squote-build.test instspc-squote-install.test \
 +      instspc-dquote-build.test instspc-dquote-install.test \
 +      instspc-bquote-build.test instspc-bquote-install.test \
 +      instspc-sharp-build.test instspc-sharp-install.test \
 +      instspc-dollar-build.test instspc-dollar-install.test \
 +      instspc-bang-build.test instspc-bang-install.test \
 +      instspc-bslash-build.test instspc-bslash-install.test \
 +      instspc-ampersand-build.test instspc-ampersand-install.test \
 +      instspc-percent-build.test instspc-percent-install.test \
 +      instspc-leftpar-build.test instspc-leftpar-install.test \
 +      instspc-rightpar-build.test instspc-rightpar-install.test \
 +      instspc-pipe-build.test instspc-pipe-install.test \
 +      instspc-caret-build.test instspc-caret-install.test \
 +      instspc-tilde-build.test instspc-tilde-install.test \
 +      instspc-qmark-build.test instspc-qmark-install.test \
 +      instspc-star-build.test instspc-star-install.test \
 +      instspc-plus-build.test instspc-plus-install.test \
 +      instspc-minus-build.test instspc-minus-install.test \
 +      instspc-comma-build.test instspc-comma-install.test \
 +      instspc-colon-build.test instspc-colon-install.test \
 +      instspc-semicol-build.test instspc-semicol-install.test \
 +      instspc-equal-build.test instspc-equal-install.test \
 +      instspc-less-build.test instspc-less-install.test \
 +      instspc-more-build.test instspc-more-install.test \
 +      instspc-at-build.test instspc-at-install.test \
 +      instspc-lqbrack-build.test instspc-lqbrack-install.test \
 +      instspc-rqbrack-build.test instspc-rqbrack-install.test \
 +      instspc-lcbrack-build.test instspc-lcbrack-install.test \
 +      instspc-rcbrack-build.test instspc-rcbrack-install.test \
 +      instspc-space-build.test instspc-space-install.test \
 +      instspc-tab-build.test instspc-tab-install.test \
 +      instspc-linefeed-build.test instspc-linefeed-install.test \
 +      instspc-backspace-build.test instspc-backspace-install.test \
 +      instspc-formfeed-build.test instspc-formfeed-install.test \
 +      instspc-carriageret-build.test \
 +      instspc-carriageret-install.test \
 +      instspc-quadrigraph0-build.test \
 +      instspc-quadrigraph0-install.test \
 +      instspc-quadrigraph1-build.test \
 +      instspc-quadrigraph1-install.test \
 +      instspc-quadrigraph2-build.test \
 +      instspc-quadrigraph2-install.test \
 +      instspc-quadrigraph3-build.test \
 +      instspc-quadrigraph3-install.test \
 +      instspc-quadrigraph4-build.test \
 +      instspc-quadrigraph4-install.test instspc-a_b-build.test \
 +      instspc-a_b-install.test instspc-a__b-build.test \
 +      instspc-a__b-install.test instspc-a_lf_b-build.test \
 +      instspc-a_lf_b-install.test instspc-dotdotdot-build.test \
 +      instspc-dotdotdot-install.test instspc-dosdrive-build.test \
 +      instspc-dosdrive-install.test instspc-miscglob1-build.test \
 +      instspc-miscglob1-install.test instspc-miscglob2-build.test \
 +      instspc-miscglob2-install.test
 +instspc_xfail_tests = instspc-squote-build.test \
 +      instspc-dquote-build.test instspc-bquote-build.test \
 +      instspc-sharp-build.test instspc-dollar-build.test \
 +      instspc-bslash-build.test instspc-ampersand-build.test \
 +      instspc-linefeed-build.test instspc-quadrigraph0-build.test \
 +      instspc-a_lf_b-build.test instspc-squote-install.test \
 +      instspc-dquote-install.test instspc-bquote-install.test \
 +      instspc-sharp-install.test instspc-dollar-install.test \
 +      instspc-linefeed-install.test instspc-a_lf_b-install.test
  TESTS = \
 -aclibobj.test \
  aclocal.test \
  aclocal3.test \
  aclocal4.test \
@@@ -479,7 -411,9 +481,10 @@@ check8.test 
  check9.test \
  check10.test \
  check11.test \
 +check12.test \
+ check-exported-srcdir.test \
+ check-tests-in-builddir.test \
+ check-tests_environment.test \
  checkall.test \
  clean.test \
  clean2.test \
@@@ -1578,85 -1429,15 +1588,88 @@@ uninstall-am
        maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
        pdf-am ps ps-am recheck recheck-html uninstall uninstall-am
  
 +backcompat5-p.log: backcompat5.test
++check-exported-srcdir-p.log: check-exported-srcdir.test
++check-tests-in-builddir-p.log: check-tests-in-builddir.test
++check-tests_environment-p.log: check-tests_environment.test
 +check-p.log: check.test
 +check10-p.log: check10.test
 +check11-p.log: check11.test
 +check12-p.log: check12.test
 +check2-p.log: check2.test
 +check3-p.log: check3.test
 +check4-p.log: check4.test
 +check5-p.log: check5.test
 +check6-p.log: check6.test
 +check7-p.log: check7.test
 +check8-p.log: check8.test
 +check9-p.log: check9.test
 +color-p.log: color.test
 +color2-p.log: color2.test
 +comment9-p.log: comment9.test
 +dejagnu-p.log: dejagnu.test
 +exeext4-p.log: exeext4.test
 +maken3-p.log: maken3.test
 +maken4-p.log: maken4.test
 +posixsubst-tests-p.log: posixsubst-tests.test
 +pr401-p.log: pr401.test
 +pr401b-p.log: pr401b.test
 +pr401c-p.log: pr401c.test
  
  $(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
 -      (cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
 +      $(AM_V_GEN)($(am__cd) $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
 +
 +$(parallel_tests): Makefile.am
 +      $(AM_V_at)rm -f $@ $@-t
 +      $(AM_V_GEN)input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \
 +      { echo '#!/bin/sh'; \
 +        echo '# DO NOT EDIT!  GENERATED AUTOMATICALLY!'; \
 +        echo; \
 +        echo '# Ensure proper definition of $$testsrcdir.'; \
 +        echo '. ./defs-static || exit 99'; \
 +        echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
 +        echo; \
 +        echo "# Run the test with Automake's parallel-tests driver enabled."; \
 +        echo 'parallel_tests=yes'; \
 +        echo "# In the spirit of VPATH, we prefer a test in the build tree"; \
 +        echo "# over one in the source tree."; \
 +        echo "if test -f \"./$$input\"; then"; \
 +        echo "  . \"./$$input\""; \
 +        echo 'else'; \
 +        echo "  . \"\$$testsrcdir/$$input\""; \
 +        echo 'fi'; \
 +      } > $@-t
 +      $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
 +
 +$(srcdir)/instspc-tests.am: instspc-tests.sh Makefile.am
 +      $(AM_V_GEN)($(am__cd) $(srcdir) \
 +        && $(SHELL) ./instspc-tests.sh --generate-makefile) >$@
  
 -$(parallel_tests): $(parallel_tests:-p.test=.test) Makefile.am
 -      input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \
 -      sed 's|^\. \./defs.*|parallel_tests=yes; &|' \
 -        < $(srcdir)/$$input >$@
 -      chmod a+rx $@
 +$(instspc_tests): Makefile.am
 +      $(AM_V_at)rm -f $@ $@-t
 +      $(AM_V_GEN) :; \
 +        base=`expr 'x/$@' : 'x.*/instspc-\(.*\)\.test$$'`; \
 +        name=`expr x"$$base" : x'\(.*\)-'`; \
 +        action=`expr x"$$base" : x'.*-\(.*\)'`; \
 +        { \
 +          echo '#!/bin/sh'; \
 +          echo '# DO NOT EDIT!  GENERATED AUTOMATICALLY!'; \
 +          echo; \
 +          echo '# Ensure proper definition of $$testsrcdir.'; \
 +          echo '. ./defs-static || exit 99'; \
 +          echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
 +          echo; \
 +          echo "instspc_test_name='$$name'"; \
 +          echo "instspc_action='test-$$action'"; \
 +          echo ". \$$testsrcdir/instspc-tests.sh"; \
 +        } > $@-t
 +      $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
 +
 +# All instspc*.test tests work by sourcing the instspc-tests.sh script.
 +$(instspc_tests:.test=.log): instspc-tests.sh
 +
 +# Each test case depends on defs, aclocal, and automake.
 +$(TEST_LOGS): defs aclocal-$(APIVERSION) automake-$(APIVERSION)
  
  clean-local: clean-local-check
  .PHONY: clean-local-check
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index cb17f75a5f384b6affa9b020836c94f5350dd08e,f0386be44b11c998c646cbb564ff2b3905639f58..298176468ae6381bb9fd788dd8fc80af90fb5f28
@@@ -43,9 -44,9 +43,9 @@@ grep 'no suitable Python interpreter fo
  
  sed 's/AM_PATH_PYTHON/AM_PATH_PYTHON(,,:)/' configure.in >configure.int
  mv -f configure.int configure.in
 -$ACLOCAL
 -$AUTOCONF
 -# This one should define PYTHON as : and exit succesfully
 +$ACLOCAL --force
 +$AUTOCONF --force
- # This one should define PYTHON as : and exit succesfully
++# This one should define PYTHON as : and exit successfully
  ./configure
  
  # Any user setting should be used.
index 62c4a6960a34268d41386662c629f8abb4854032,d2ace1f421c2f5d336f33cfcaf152d0e44915b8d..4403dda57372bcd2c4325f9fddb3a2523eb6011b
  
  . ./defs || Exit 1
  
 -set -e
 -
+ $ACLOCAL
  
 -
  echo 1. pythondir not defined
  
  cat > Makefile.am <<'END'
Simple merge
Simple merge
index eabd90090e43ae91565900fd4410daaa00d114f3,a4c2b403109aa964a631ba4a4cb6cda130793b45..8acbdfeece6af2e97ecaa3db501fe5dd0f20885f
  # Python is not required for this test.
  . ./defs || Exit 1
  
 -set -e
 -
  cat >>configure.in <<EOF
  # Hopefully the Python team will never release such a version.
- AM_PATH_PYTHON(9999.9)
+ AM_PATH_PYTHON([9999.9])
  AC_OUTPUT
  EOF
  
index ac842b30c3ec7c4d4bf9dce68fda7510c553080a,117448aea57afb485d12dcd3816ac1a2595596e9..8b3c6f367bfaa3fbc211fdc1f614e56386272021
  # Python is not required for this test.
  . ./defs || Exit 1
  
 -set -e
 -
  cat >>configure.in <<\EOF
- AM_PATH_PYTHON(,, [echo "GREP ME$PYTHON" >&2])
+ AM_PATH_PYTHON(,, [echo "$PYTHON" > py])
  AC_OUTPUT
  EOF
  
index 1c7d4824257a4113ed15e9ff43638abc1436965e,b74dc9b2be512172eec35ae6a02cff3b9a2524d7..1390a4e151e336e458a70e6811480cec37168d6c
  # Python is not required for this test.
  . ./defs || Exit 1
  
 -set -e
 -
  cat >>configure.in <<\EOF
  # Hopefully the Python team will never release such a version.
- AM_PATH_PYTHON(9999.9,, [echo "GREP ME$PYTHON" >&2])
+ AM_PATH_PYTHON([9999.9], [], [echo "$PYTHON" > py])
  AC_OUTPUT
  EOF
  
index 8ed3c3dfd58af0c905beabd49af0857103e257c7,cd87a51785e7c9625f5725504aaf30de054b8349..981e64d548f4206de4d78253d4126d9342b58634
  required=python
  . ./defs || Exit 1
  
- cat >>configure.in <<EOF
- AM_PATH_PYTHON(, [echo 'GREP ME' >&2])
 -set -e
 -
+ cat >>configure.in <<'EOF'
+ # $PYTHON is supposed to be properly set in ACTION-IF-TRUE.
+ AM_PATH_PYTHON(, [$PYTHON -V >py-version 2>&1])
  AC_OUTPUT
  EOF
  
index e58058cc9143599d76f8222794444aa278782f74,71588f8bfd65aaad9b67325c7df038a90d264886..da95884af2c32b9ad3288646033c9ab58146f276
  required=python
  . ./defs || Exit 1
  
- cat >>configure.in <<EOF
- AM_PATH_PYTHON(0.0, [echo 'GREP ME' >&2])
 -set -e
 -
+ cat >>configure.in <<'EOF'
+ # $PYTHON is supposed to be properly set in ACTION-IF-TRUE.
+ AM_PATH_PYTHON([0.0], [$PYTHON -c 'print("%u:%u" % (1-1, 2**0))' > py.out])
  AC_OUTPUT
  EOF