automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-702-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-702-gfeac65b
Date: Mon, 14 Feb 2011 23:52:16 +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=feac65b70b29c759b99ebdcba81f93b9450f401e

The branch, master has been updated
       via  feac65b70b29c759b99ebdcba81f93b9450f401e (commit)
       via  50427eb4a86f3b9e05ef512f208c8a42a34a0084 (commit)
      from  0fc7e23fe9fb5fcebfb22ff56d5c64c9030b3dc3 (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 feac65b70b29c759b99ebdcba81f93b9450f401e
Merge: 0fc7e23 50427eb
Author: Stefano Lattarini <address@hidden>
Date:   Tue Feb 15 00:47:52 2011 +0100

    Merge branch 'python-tests-extend'

commit 50427eb4a86f3b9e05ef512f208c8a42a34a0084
Author: Stefano Lattarini <address@hidden>
Date:   Sun Feb 13 11:40:16 2011 +0100

    python: fix spurious failure in tests
    
    * tests/python-vars.test: Ignore cached values from config.site
    by exporting CONFIG_SITE=/dev/null.  Be laxer in matching the
    expected values of output variables `pythondir' and `pyexecdir',
    since they can change quite unpredictably among different python
    installations.  Also, avoid "hyping" debugging output, thus
    offering smaller trace output and more informative diff.
    * tests/python-virtualenv.test: Require python, since we call it
    even after the virtualenv has been deactivated.  Ignore cached
    values from config.site by exporting CONFIG_SITE=/dev/null.
    
    Report and suggestions by Ralf Wildenhues.

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

Summary of changes:
 ChangeLog                    |   14 ++++++++++++++
 tests/python-vars.test       |   38 +++++++++++++++++++++++++++-----------
 tests/python-virtualenv.test |    5 ++++-
 3 files changed, 45 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 95aa6a8..50c24fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2011-02-14  Stefano Lattarini  <address@hidden>
+
+       python: fix spurious failure in tests
+       * tests/python-vars.test: Ignore cached values from config.site
+       by exporting CONFIG_SITE=/dev/null.  Be laxer in matching the
+       expected values of output variables `pythondir' and `pyexecdir',
+       since they can change quite unpredictably among different python
+       installations.  Also, avoid "hyping" debugging output, thus
+       offering smaller trace output and more informative diff.
+       Report and suggestions by Ralf Wildenhues.
+       * tests/python-virtualenv.test: Require python, since we call it
+       even after the virtualenv has been deactivated.  Ignore cached
+       values from config.site by exporting CONFIG_SITE=/dev/null.
+
 2011-02-06  Stefano Lattarini  <address@hidden>
 
        tests: tweak few tests on simple and parallel test drivers
diff --git a/tests/python-vars.test b/tests/python-vars.test
index ad263a5..7defee2 100755
--- a/tests/python-vars.test
+++ b/tests/python-vars.test
@@ -22,23 +22,28 @@ required=python
 
 set -e
 
+# In case the user's config.site defines pythondir or pyexecdir.
+CONFIG_SITE=/dev/null; export CONFIG_SITE
+
 PYTHON=python
 
-# Update these if the documentation changes.
+# Update the definition below if the documentation changes.
+# Note that the value of the `pythondir' and `pyexecdir' variables can
+# vary among different python installations, so we need more relaxed
+# and ad-hoc checks for them.  Also, more proper "functional" checks
+# on them should be done in the `python-virtualenv.test' test.
 PYTHON_VERSION=`$PYTHON -c 'import sys; print(sys.version[:3])'` || Exit 1
 PYTHON_PLATFORM=`$PYTHON -c 'import sys; print(sys.platform)'` || Exit 1
 PYTHON_EXEC_PREFIX='${exec_prefix}'
 PYTHON_PREFIX='${prefix}'
-pythondir="\${prefix}/lib/python$PYTHON_VERSION/site-packages"
-pyexecdir="\${exec_prefix}/lib/python$PYTHON_VERSION/site-packages"
 pkgpythondir="\${pythondir}/$me"
 pkgpyexecdir="\${pyexecdir}/$me"
 
 pyvars='PYTHON_VERSION PYTHON_PLATFORM PYTHON_PREFIX PYTHON_EXEC_PREFIX
-        pythondir pyexecdir pkgpythondir pkgpyexecdir'
+        pkgpythondir pkgpyexecdir'
 
 cat >> configure.in << 'END'
-AC_CONFIG_FILES([vars-got])
+AC_CONFIG_FILES([vars-got pythondir pyexecdir])
 AM_PATH_PYTHON
 AC_OUTPUT
 END
@@ -58,19 +63,30 @@ check-local: test-in test-am
 .PHONY: test-in test-am
 
 test-in:
+       cat pythondir
+       case `cat pythondir` in '$${prefix}'/*);; *) exit 1;; esac
+       cat pyexecdir
+       case `cat pyexecdir` in '$${exec_prefix}'/*);; *) exit 1;; esac
        cat $(srcdir)/vars-exp
        cat $(builddir)/vars-got
        diff $(srcdir)/vars-exp $(builddir)/vars-got
+
+## Note: this target's rules will be extended in the "for" loop below.
+test-am:
+       case '$(pythondir)' in '$(prefix)'/*);; *) exit 1;; esac
+       case '$(pyexecdir)' in '$(exec_prefix)'/*);; *) exit 1;; esac
 END
 
-echo > vars-exp
-echo > vars-got.in
-echo test-am: >> Makefile.am
+echo @pythondir@ > pythondir.in
+echo @pyexecdir@ > pyexecdir.in
+
+: > vars-exp
+: > vars-got.in
 
 for var in $pyvars; do
   eval val=\$$var
-  (echo "### $var ###" && echo "$val" && echo) >> vars-exp
-  (echo "### $var ###" && echo "@$var@" && echo) >> vars-got.in
+  echo "var=$val" >> vars-exp
+  echo "address@hidden@" >> vars-got.in
   echo "${tab}test x'\$($var)' = x'$val'" >> Makefile.am
 done
 
@@ -80,7 +96,7 @@ cat vars-got.in
 $ACLOCAL
 $AUTOMAKE --add-missing
 
-for var in $pyvars; do
+for var in pythondir pyexecdir $pyvars; do
   grep "^$var *=" Makefile.in
 done
 
diff --git a/tests/python-virtualenv.test b/tests/python-virtualenv.test
index 478a8dc..4bbfbfc 100755
--- a/tests/python-virtualenv.test
+++ b/tests/python-virtualenv.test
@@ -17,11 +17,14 @@
 # Check that python support can work well with virtualenvs.
 # This test also works as a mild stress-test on the python support.
 
-required=virtualenv
+required='python virtualenv'
 . ./defs || Exit 1
 
 set -e
 
+# In case the user's config.site defines pythondir or pyexecdir.
+CONFIG_SITE=/dev/null; export CONFIG_SITE
+
 # Skip the test if a proper virtualenv cannot be created.
 virtualenv --verbose virtenv || Exit 77
 test -f virtenv/bin/activate || Exit 77


hooks/post-receive
-- 
GNU Automake



reply via email to

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