"make test" fails on 2.9.0-b1?
Sorry for redundancy if this is a known problem, but I just now grabbed the 2.9.0-b1 tarball and noticed this: pw@kermit Zope-2.9.0b1 $ ./configure --prefix=/home/pw/Zope-2.9.0b1-SoftwareHome Configuring Zope installation Testing for an acceptable Python interpreter... Python version 2.4.2 found at /usr/bin/python The optimum Python version (2.4.2) was found at /usr/bin/python. pw@kermit Zope-2.9.0b1 $ less Makefile pw@kermit Zope-2.9.0b1 $ make && make test && make install /usr/bin/python install.py -q build /usr/bin/python install.py -q build /usr/bin/python test.py -v Traceback (most recent call last): File "test.py", line 32, in ? import zope.app.testing.test ImportError: No module named test make: *** [test] Error 1 Is "make test" expected to work currently? -- Paul Winkler http://www.slinkp.com
The build process changed in 2.9. Perhaps "make inplace; make test" should work. -aj --On 11. Dezember 2005 22:43:02 -0500 Paul Winkler <pw_lists@slinkp.com> wrote:
Sorry for redundancy if this is a known problem, but I just now grabbed the 2.9.0-b1 tarball and noticed this:
pw@kermit Zope-2.9.0b1 $ ./configure --prefix=/home/pw/Zope-2.9.0b1-SoftwareHome Configuring Zope installation
Testing for an acceptable Python interpreter...
Python version 2.4.2 found at /usr/bin/python
The optimum Python version (2.4.2) was found at /usr/bin/python.
pw@kermit Zope-2.9.0b1 $ less Makefile pw@kermit Zope-2.9.0b1 $ make && make test && make install /usr/bin/python install.py -q build /usr/bin/python install.py -q build /usr/bin/python test.py -v Traceback (most recent call last): File "test.py", line 32, in ? import zope.app.testing.test ImportError: No module named test make: *** [test] Error 1
Is "make test" expected to work currently?
--
Paul Winkler http://www.slinkp.com _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
On Mon, Dec 12, 2005 at 05:40:27AM +0100, Andreas Jung wrote:
The build process changed in 2.9. Perhaps "make inplace; make test" should work. -aj
Good thought, but there is no "inplace" target anymore. What is now the canonical way of running tests in a release tarball? Is there one? -PW -- Paul Winkler http://www.slinkp.com
Paul Winkler wrote:
On Mon, Dec 12, 2005 at 05:40:27AM +0100, Andreas Jung wrote:
The build process changed in 2.9. Perhaps "make inplace; make test" should work. -aj
Good thought, but there is no "inplace" target anymore.
Yup, Andreas was referring to the SVN checkout.
What is now the canonical way of running tests in a release tarball? Is there one?
"make test" *is* the canonical way of running tests. It's only that the Zope/releases/Zope2/test.py script has a bug. It imports zope.app.testing.test which doesn't exist in Zope 3.2 anymore. The reason it has that bug is that it was copied from Zope 3 without much thinking. Neither I nor the release managers of Zope 2 and 3 seemed to have run "make test" before and after the betas, otherwise this problem would have been apparent right away. I guess it should use zope.testing.testrunner instead of zope.app.testing.test, though I'm not sure how the parameters and options convert. Philipp
On Mon, Dec 12, 2005 at 05:01:35PM +0100, Philipp von Weitershausen wrote:
I guess it should use zope.testing.testrunner instead of zope.app.testing.test, though I'm not sure how the parameters and options convert.
I don't think that's the problem: pw@kermit Zope-2.9-branch $ svn up test.py At revision 40739. pw@kermit Zope-2.9-branch $ grep import test.py import os.path, sys from zope.testing import testrunner import Zope2 pw@kermit Zope-2.9-branch $ make test "/usr/bin/python" "/home/pw/Downloads/Apps/Net/Zope-2.9-branch/setup.py" \ build_ext -i running build_ext running build_headers "/usr/bin/python" "/home/pw/Downloads/Apps/Net/Zope-2.9-branch/test.py" -v Traceback (most recent call last): File "/home/pw/Downloads/Apps/Net/Zope-2.9-branch/test.py", line 83, in ? from zope.testing import testrunner ImportError: No module named zope.testing make: *** [test] Error 1 Looks to me like it's a simple PYTHONPATH problem: pw@kermit Zope-2.9-branch $ export PYTHONPATH=$PYTHONPATH:/home/pw/Downloads/Apps/Net/Zope-2.9-branch/lib/python/ pw@kermit Zope-2.9-branch $ make test "/usr/bin/python" "/home/pw/Downloads/Apps/Net/Zope-2.9-branch/setup.py" \ build_ext -i running build_ext running build_headers "/usr/bin/python" "/home/pw/Downloads/Apps/Net/Zope-2.9-branch/test.py" -v Running tests at level 1 /usr/lib/python2.4/whrandom.py:38: DeprecationWarning: the whrandom module is deprecated; please use the random module DeprecationWarning) /home/pw/ZopeSoftwareHome/lib/python/SearchIndex/__init__.py:19: DeprecationWarning: The usage of the SearchIndex package is deprecated since Zope 2.4. This package is only kept for backwards compatibility for a while and will go away in a future release. Please use instead the re-factored modules in Products/PluginIndexes. warnings.warn("The usage of the SearchIndex package is deprecated since \ Test-module import failures: Module: BDBStorage.tests.testall TypeError: Invalid test_suite, None, in BDBStorage.tests.testall Running unit tests: Running: .................................................. .................................................. (snip etc.) -- Paul Winkler http://www.slinkp.com
On Mon, Dec 12, 2005 at 12:43:35PM -0500, Paul Winkler wrote:
Looks to me like it's a simple PYTHONPATH problem: (snip)
OK, is Makefile.in the right place to fix that? This patch seems to work: pw@kermit Zope-2.9-branch $ svn diff inst/Makefile.in Index: inst/Makefile.in =================================================================== --- inst/Makefile.in (revision 40735) +++ inst/Makefile.in (working copy) @@ -80,7 +80,7 @@ # test: Do an inplace build and run the Zope test suite. test: inplace - ${PYTHON} "${BASE_DIR}/test.py" ${TESTOPTS} + PYTHONPATH=${PYTHONPATH}:${BASE_DIR}/lib/python ${PYTHON} "${BASE_DIR}/test.py" ${TESTOPTS} # clean: Delete the build files and any binaries/bytecode files # in # the source directory for good measure. But I do get some odd output - what's this about BDBStorage at the end? pw@kermit Zope-2.9-branch $ make test "/usr/bin/python" "/home/pw/Downloads/Apps/Net/Zope-2.9-branch/setup.py" \ build_ext -i running build_ext running build_headers PYTHONPATH=/usr/lib/portage/pym:/usr/local/lib/python:/usr/local/lib/python/piddle:/home/pw/bin/python:/home/pw/Downloads/Apps/Net/Zope-2.9-branch/lib/python "/usr/bin/python" "/home/pw/Downloads/Apps/Net/Zope-2.9-branch/test.py" -v Running tests at level 1 (snip) ................................ Ran 1432 tests with 0 failures and 0 errors in 283.344 seconds. Test-modules with import problems: BDBStorage.tests.testall make: *** [test] Error 1 -- Paul Winkler http://www.slinkp.com
Just to clarify - sorry for confusing the issue (and myself): There are two separate problems here. "make test" doesn't work in a sandbox *or* a release tarball. The patch below addresses only the former. Phillip is right about the latter, it's got a broken import. -PW On Mon, Dec 12, 2005 at 12:52:24PM -0500, Paul Winkler wrote:
On Mon, Dec 12, 2005 at 12:43:35PM -0500, Paul Winkler wrote:
Looks to me like it's a simple PYTHONPATH problem: (snip)
OK, is Makefile.in the right place to fix that? This patch seems to work:
pw@kermit Zope-2.9-branch $ svn diff inst/Makefile.in Index: inst/Makefile.in =================================================================== --- inst/Makefile.in (revision 40735) +++ inst/Makefile.in (working copy) @@ -80,7 +80,7 @@
# test: Do an inplace build and run the Zope test suite. test: inplace - ${PYTHON} "${BASE_DIR}/test.py" ${TESTOPTS} + PYTHONPATH=${PYTHONPATH}:${BASE_DIR}/lib/python ${PYTHON} "${BASE_DIR}/test.py" ${TESTOPTS}
# clean: Delete the build files and any binaries/bytecode files # in # the source directory for good measure.
But I do get some odd output - what's this about BDBStorage at the end?
pw@kermit Zope-2.9-branch $ make test "/usr/bin/python" "/home/pw/Downloads/Apps/Net/Zope-2.9-branch/setup.py" \ build_ext -i running build_ext running build_headers PYTHONPATH=/usr/lib/portage/pym:/usr/local/lib/python:/usr/local/lib/python/piddle:/home/pw/bin/python:/home/pw/Downloads/Apps/Net/Zope-2.9-branch/lib/python "/usr/bin/python" "/home/pw/Downloads/Apps/Net/Zope-2.9-branch/test.py" -v Running tests at level 1
(snip) ................................ Ran 1432 tests with 0 failures and 0 errors in 283.344 seconds.
Test-modules with import problems: BDBStorage.tests.testall make: *** [test] Error 1
--
Paul Winkler http://www.slinkp.com _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
-- Paul Winkler http://www.slinkp.com
On Mon, Dec 12, 2005 at 01:08:16PM -0500, Paul Winkler wrote:
Phillip is right about the latter, it's got a broken import.
OK, I have a patch for "make test" that allows it to at least run, but with lots of test errors. I think I will have to pass on this one and leave it to somebody who's more familiar with the new test runner. Collector issue is here: http://www.zope.org/Collectors/Zope/1968 -- Paul Winkler http://www.slinkp.com
Andreas Jung wrote:
The build process changed in 2.9. Perhaps "make inplace; make test" should work.
He explicity said in a tarball. "make inplace" only exists in SVN. As a reminder: SVN repo != release tarball I know it's always been '==' for every other Zope 2 version, but 2.9 is different because it's packaged by zpkgutils. Philipp
On Mon, Dec 12, 2005 at 04:54:24PM +0100, Philipp von Weitershausen wrote:
Andreas Jung wrote:
The build process changed in 2.9. Perhaps "make inplace; make test" should work.
He explicity said in a tarball. "make inplace" only exists in SVN. As a reminder:
SVN repo != release tarball
I know it's always been '==' for every other Zope 2 version, but 2.9 is different because it's packaged by zpkgutils.
Aha, that explains a lot of things. Thanks. This complicates docs somewhat. Not sure how we can handle this. We may need to change doc/INSTALL.txt to include separate instructions for SVN checkouts vs. tarball releases. Filed here: http://www.zope.org/Collectors/Zope/1967 -- Paul Winkler http://www.slinkp.com
participants (3)
-
Andreas Jung -
Paul Winkler -
Philipp von Weitershausen