[Buildbot-commits] buildbot/buildbot/process step_twisted.py,1.65,1.66

Brian Warner warner at users.sourceforge.net
Mon Apr 11 19:30:33 UTC 2005


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

Modified Files:
	step_twisted.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-32
Creator:  Brian Warner <warner at monolith.lothar.com>

merge epydoc work from org.apestaart at thomas/buildbot--doc--0--patch-3

* general: merge org.apestaart at thomas/buildbot--doc--0--patch-3,
adding epydoc-format docstrings to many classes. Thanks to Thomas
Vander Stichele for the patches.
* docs/epyrun, docs/gen-reference: add epydoc-generating tools
* buildbot/status/mail.py, buildbot/process/step_twisted.py: same
* buildbot/slave/bot.py, commands.py, registry.py: same


Index: step_twisted.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step_twisted.py,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- step_twisted.py	2 Apr 2005 20:20:15 -0000	1.65
+++ step_twisted.py	11 Apr 2005 19:30:30 -0000	1.66
@@ -20,12 +20,7 @@
     from recommended style is flagged and put in the output log.
 
     This step looks at .changes in the parent Build to extract a list of
-    Lore XHTML files to check.
-
-    @param results: [warnings, output]. 'warnings' is the number of problems
-    that were found in the XHTML files (equal to the number of lines of
-    output that have colons in them), 0 if none were found. 'output' is a
-    string with all the warnings."""
+    Lore XHTML files to check."""
 
     name = "hlint"
     description = ["running", "hlint"]
@@ -36,6 +31,15 @@
     warnings = 0
 
     def __init__(self, python=None, **kwargs):
+        """
+        @type    results: double of [int, string]
+        @keyword results: [warnings, output].
+                          - warnings: the number of problems that were found
+                            in the XHTML files (equal to the number of lines of
+                            output that have colons in them), 0 if none were
+                            found.
+                          - output: string with all the warnings.
+        """
         ShellCommand.__init__(self, **kwargs)
         self.python = python
 
@@ -201,53 +205,7 @@
     exceptions) to a file named test.log . This file will be pulled up to
     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
-     path (like /usr/bin/trial or ./bin/trial). Defaults to None, which
-     leaves it out entirely (running 'trial args' instead of 'python
-     ./bin/trial args'). Likely values are 'python', ['python2.2'],
-     ['python', '-Wall'], etc.
-
-    @param trial: which 'trial' executable to run. Defaults to 'trial', which
-     will cause $PATH to be searched and probably find /usr/bin/trial . If
-     you set 'python', this should be set to an explicit path (because
-     'python2.3 trial' will not work).
-
-    @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.
-
-    @param testChanges: if True, ignore the 'tests' parameter and instead ask
-     the Build for all the files that make up the Changes going into this
-     build. Pass these filenames to trial and ask it to look for
-     test-case-name tags, running just the tests necessary to cover the
-     changes.
-
-    @param recurse: If true, pass the --recurse option to trial, allowing
-     test cases to be found in deeper subdirectories of the modules listed in
-     'tests'. This does not appear to be necessary when using testChanges.
-
-    @param reactor: which reactor to use, like 'gtk' or 'java'. If not
-     provided, the Twisted's usual platform-dependent default is used.
-
-    @param randomly: if True, add the --random=0 argument, which instructs
-     trial to run the unit tests in a random order each time. This
-     occasionally catches problems that might be masked when one module
-     always runs before another (like failing to make registerAdapter calls
-     before lookups are done).
-
-    In addition, the following parameters are inherited from ShellCommand and
-    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
+    There are some class attributes which may be usefully overridden
     by subclasses. 'trialMode' and 'trialArgs' can influence the trial
     command line.
     """
@@ -268,6 +226,68 @@
                  testpath=UNSPECIFIED,
                  tests=None, testChanges=None,
                  recurse=None, randomly=None, **kwargs):
+        """
+        @type  testpath: string
+        @param testpath: 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.
+
+        @type  python: string (without spaces) or list
+        @param python: which python executable to use. Will form the start of
+                       the argv array that will launch trial. If you use this,
+                       you should set 'trial' to an explicit path (like
+                       /usr/bin/trial or ./bin/trial). Defaults to None, which
+                       leaves it out entirely (running 'trial args' instead of
+                       'python ./bin/trial args'). Likely values are 'python',
+                       ['python2.2'], ['python', '-Wall'], etc.
+
+        @type  trial: string
+        @param trial: which 'trial' executable to run.
+                      Defaults to 'trial', which will cause $PATH to be
+                      searched and probably find /usr/bin/trial . If you set
+                      'python', this should be set to an explicit path (because
+                      'python2.3 trial' will not work).
+
+        @type  tests: list of strings
+        @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.
+
+        @type  testChanges: boolean
+        @param testChanges: if True, ignore the 'tests' parameter and instead
+                            ask the Build for all the files that make up the
+                            Changes going into this build. Pass these filenames
+                            to trial and ask it to look for test-case-name
+                            tags, running just the tests necessary to cover the
+                            changes.
+
+        @type  recurse: boolean
+        @param recurse: If True, pass the --recurse option to trial, allowing
+                        test cases to be found in deeper subdirectories of the
+                        modules listed in 'tests'. This does not appear to be
+                        necessary when using testChanges.
+
+        @type  reactor: string
+        @param reactor: which reactor to use, like 'gtk' or 'java'. If not
+                        provided, the Twisted's usual platform-dependent
+                        default is used.
+
+        @type  randomly: boolean
+        @param randomly: if True, add the --random=0 argument, which instructs
+                         trial to run the unit tests in a random order each
+                         time. This occasionally catches problems that might be
+                         masked when one module always runs before another
+                         (like failing to make registerAdapter calls before
+                         lookups are done).
+
+        @type  kwargs: dict
+        @param kwargs: parameters. The following parameters are inherited from
+                       L{ShellCommand} and may be useful to set: workdir,
+                       haltOnFailure, flunkOnWarnings, flunkOnFailure,
+                       warnOnWarnings, warnOnFailure, want_stdout, want_stderr,
+                       timeout.
+        """
         ShellCommand.__init__(self, **kwargs)
 
         if python:
@@ -579,13 +599,6 @@
     """I build all docs. This requires some LaTeX packages to be installed.
     It will result in the full documentation book (dvi, pdf, etc).
     
-    @param workdir: the workdir to start from: must be the base of the
-    Twisted tree
-
-    @param results: [rc, warnings, output]. rc==0 if all files were
-    converted successfully. warnings is a count of hlint warnings. 'output'
-    is the verbose output of the command.
-
     """
 
     name = "process-docs"
@@ -595,6 +608,20 @@
     descriptionDone = ["docs"]
     # TODO: track output and time
 
+    def __init__(self, **kwargs):
+        """
+        @type    workdir: string
+        @keyword workdir: the workdir to start from: must be the base of the
+                          Twisted tree
+
+        @type    results: triple of (int, int, string)
+        @keyword results: [rc, warnings, output]
+                          - rc==0 if all files were converted successfully.
+                          - warnings is a count of hlint warnings. 
+                          - output is the verbose output of the command.
+        """
+        ShellCommand.__init__(self, **kwargs)
+
     def createSummary(self, log):
         output = log.getText()
         # hlint warnings are of the format: 'WARNING: file:line:col: stuff





More information about the Commits mailing list