Commit 2f6da30d authored by jim's avatar jim

Renamed distribution option to eggs.


git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@68912 62d5b8a3-27da-0310-9561-8e5933582275
parent 5f9691ea
Recipe for generating a custom test runner.
Test-Runner Recipe
==================
This recipe generates zope.testing test-runenr scripts for testing a
collection of eggs. The eggs must already be installed (using the
zc.recipe.egg recipe)
The test-runner recipe has 2 options:
- The eggs option takes the names of the eggs to be
tested. These are not installed by the recipe. They must be
installed by some other recipe (or using the buildout develop
option). The distributions are in the form os setuptools
requirements. Multiple distributions must be listed on separate
lines. This option is required.
- The script option gives the name of the script to generate, in the
buildout bin directory. Of the option isn't used, the part name
will be used.
To do
-----
- Don't require eggs to be installed by the egg recipe. Go ahead
and try to install them.
- Let the egg recipe do more of the heavy lifting internally.
- Support specifying testrunner defaults (e.g. verbosity, test file
patterns, etc.)
......@@ -4,16 +4,16 @@ Test-Runner Recipe
The test-runner recipe, zc.recipe.testrunner, creates a test runner
for a project.
The rest-runner recipe has 2 options:
The test-runner recipe has 2 options:
- The distributions option takes the names of the distributions to be
tested. These are not installed by the recipe. They must be
installed by some other recipe (or using the buildout develop
option). The distributions are in the form os setuptools
requirements. Multiple distributions must be listed on separate
lines. This option is required.
- The script option gives the name of the script to generate, in the
eggs
The eggs option specified a list of eggs to test given as one ore
more setuptools requirement strings. Each string must be given on
a separate line.
script
The script option gives the name of the script to generate, in the
buildout bin directory. Of the option isn't used, the part name
will be used.
......@@ -109,14 +109,14 @@ develop egg and to create the test script:
...
... [testdemo]
... recipe = zc.recipe.testrunner
... distributions =
... eggs =
... demo
... demo2
... script = test
... """)
Note that we specified both demo and demo2 in the distributions
section and that we put them on separate lines.
Note that we specified both demo and demo2 in the eggs
option and that we put them on separate lines.
We also specified the offline option to run the buildout in offline mode.
......@@ -143,7 +143,7 @@ We can run the test script to run our demo test:
Ran 2 tests with 0 failures and 0 errors in 0.000 seconds.
Note that we didn't run the demoneeded tests. Tests are only run for
the distributions listed, not for their dependencies.
the eggs listed, not for their dependencies.
If we leave the script option out of the configuration, then the test
script will get it's name from the part:
......@@ -157,7 +157,7 @@ script will get it's name from the part:
...
... [testdemo]
... recipe = zc.recipe.testrunner
... distributions = demo
... eggs = demo
... """)
>>> print system(os.path.join(sample_buildout, 'bin', 'buildout')),
......
......@@ -38,7 +38,7 @@ class TestRunner:
def install(self):
options = self.options
requirements = [r.strip()
for r in options['distributions'].split('\n')
for r in options['eggs'].split('\n')
if r.strip()]
ws = zc.buildout.easy_install.working_set(
requirements+['zope.testing'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment