[Buildbot-devel] Some questions/problems running latest build bot source on Windows

Brian Warner warner-buildbot at lothar.com
Tue Nov 9 20:00:11 UTC 2004

> I see the tests hang at:
> testSlave (buildbot.test.test_run.Status)
> and consume a *lot* of CPU. Interrupting the test with CTRL-C, the stack
> trace ends up down in win32eventreactor.py, doWaitForMultipleEvents.
> Is there a way for me to comment out this test so that I can see if the
> others pass?

Yes, just add a .skip attribute to the test method (or to the whole test
case), with a string describing the reason for the skip:

class Foo(unittest.TestCase):
    skip = "set this one to skip the whole TestCase"

    def testBar(self):
    testBar.skip = "or this one to just skip a particular method"

The 100%-CPU thing comes from the (non-ideal) way in which the asynchronous
test cases wait for something to complete. The updated test framework in
twisted-2.0 will make it easier for these tests to A) restrain themselves to
less CPU (by sleeping a tiny amount between reactor iterations instead of not
sleeping at all), and B) implement a consistent timeout so it doesn't spin

Also, take a look in _trial_temp/test.log: it contains the text that is
normally sent to 'twistd.log' by daemonized processes. The hang is probably
accompanied by an exception, which will have been logged to test.log.

(for the curious, many tests run in a 'while 1' loop that breaks when a flag
is set by a callback.. if the callback raises an exception before it gets to
set the flag, the test can spin forever. The new 'retrial' framework provides
a common function to wait for a flag to be set, implementing a configurable
timeout for you, to avoid these unpleasant failure modes).


More information about the devel mailing list