[Buildbot-commits] buildbot/buildbot/process step_twisted.py,1.62,1.63 factory.py,1.5,1.6

Brian Warner warner at users.sourceforge.net
Tue Nov 23 01:13:57 UTC 2004


Update of /cvsroot/buildbot/buildbot/buildbot/process
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15915/buildbot/process

Modified Files:
	step_twisted.py factory.py 
Log Message:
* buildbot/process/step_twisted.py (Trial): update docs a bit

* docs/factories.xhtml: fix Trial factory docs to match reality.
Closes: SF#1049758.

* buildbot/process/factory.py (Trial.__init__): add args for
randomly= and recurse=, making them available to instantiators
instead of only to subclassers. Closes: SF#1049759.


Index: factory.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/factory.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- factory.py	15 Sep 2004 08:54:29 -0000	1.5
+++ factory.py	23 Nov 2004 01:13:55 -0000	1.6
@@ -88,19 +88,30 @@
     """Build a python module that uses distutils and trial. Set 'tests' to
     the module in which the tests can be found, or set useTestCaseNames=True
     to always have trial figure out which tests to run (based upon which
-    files have been changed)."""
+    files have been changed).
+
+    See docs/factories.xhtml for usage samples. Not all of the Trial
+    BuildStep options are available here, only the most commonly used ones.
+    To get complete access, you will need to create a custom
+    BuildFactory."""
 
     trial = "trial"
     randomly = False
     recurse = False
 
     def __init__(self, source,
-                 buildpython=["python"], trialpython=[],
-                 testpath=".",
+                 buildpython=["python"], trialpython=[], trial=None
+                 testpath=".", randomly=None, recurse=None,
                  tests=None,  useTestCaseNames=False, env=None):
         assert type(source) is tuple
         assert issubclass(source[0], step.BuildStep)
         assert tests or useTestCaseNames, "must use one or the other"
+        if trial is not None:
+            self.trial = trial
+        if randomly is not None:
+            self.randomly = randomly
+        if recurse is not None:
+            self.recurse = recurse
 
         from buildbot.process import step_twisted
         self.steps = []
@@ -115,33 +126,6 @@
                             recurse=self.recurse,
                             env=env,
                             ))
-# examples: (TODO: move these into the docs)
-
-#  Trial(source, tests="toplevel.test") does:
-#   python ./setup.py build
-#   PYTHONPATH=. trial -to toplevel.test
-
-#  Trial(source, tests=["toplevel.test", "other.test"]) does:
-#   python ./setup.py build
-#   PYTHONPATH=. trial -to toplevel.test other.test
-
-#  Trial(source, useTestCaseNames) does:
-#   python ./setup.py build
-#   PYTHONPATH=. trial -to --testmodule=foo/bar.py..  (from Changes)
-
-#  Trial(source, buildpython=["python2.3", "-Wall"], tests="foo.tests") does:
-#   python2.3 -Wall ./setup.py build
-#   PYTHONPATH=. trial -to foo.tests
-
-#  Trial(source, trialpython="python2.3", trial="/usr/bin/trial",
-#        tests="foo.tests") does:
-#   python2.3 -Wall ./setup.py build
-#   PYTHONPATH=. python2.3 /usr/bin/trial -to foo.tests
-
-#  Trial(source, trialpython=["python2.3", "-Wall"], trial="./bin/trial",
-#        tests="foo.tests") does:
-#   python2.3 -Wall ./setup.py build
-#   PYTHONPATH=. python2.3 -Wall ./bin/trial -to foo.tests
 
 
 # compatibility classes, will go away. Note that these only offer

Index: step_twisted.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step_twisted.py,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- step_twisted.py	8 Nov 2004 09:50:17 -0000	1.62
+++ step_twisted.py	23 Nov 2004 01:13:54 -0000	1.63
@@ -196,6 +196,10 @@
     the master where it can be seen as part of the status output.
 
 
+    @param testpath: a string to use in PYTHONPATH when running the tests. If
+     None, do not set PYTHONPATH. Setting this to '.' will cause the source
+     files to be used in-place.
+
     @param python: which python executable to use. Must be a string (without
      spaces) or a list, and will form the start of the argv array that will
      launch trial. If you use this, you should set 'trial' to an explicit
@@ -209,10 +213,6 @@
      you set 'python', this should be set to an explicit path (because
      'python2.3 trial' will not work).
 
-    @param testpath: a string to use in PYTHONPATH when running the tests. If
-     None, do not set PYTHONPATH. Setting this to '.' will cause the source
-     files to be used in-place.
-
     @param tests: a list of test modules to run, like
      ['twisted.test.test_defer', 'twisted.test.test_process']. If this is
      a string, it will be converted into a one-item list.
@@ -240,6 +240,10 @@
     may be useful to set: workdir, haltOnFailure, flunkOnWarnings,
     flunkOnFailure, warnOnWarnings, warnOnFailure, want_stdout, want_stderr,
     timeout.
+
+    Also, there are some class attributes which may be usefully overridden
+    by subclasses. 'trialMode' and 'trialArgs' can influence the trial
+    command line.
     """
 
     flunkOnFailure = True





More information about the Commits mailing list