[Buildbot-devel] Experiences and problems installing on Windows

Brian Warner warner-buildbot at lothar.com
Thu Oct 14 17:02:46 UTC 2004


> I'm currently trying to install buildbot 0.6.0 on WinXP & Win2K with
> ActivePython 2.3.2, and documenting the process.

Thank you! This is exactly the sort of coverage we need!

> 1: In order to run commands like "trial" and "mktap" I needed to add
> the path to the Python "Scripts" folder to the PATH environment
> variable.
> In the process I also created a buildbot batch file, which makes
> executing buildbot slightly easier. Just stick this one line in
> "scripts/buildbot.bat":
> 
> python C:\Python23\Scripts\buildbot %*

I've added this as contrib/windows/buildbot.bat in CVS.

> 2: The trial command to run the tests works as long as you leave the
> "PYTHONPATH=." off the front. However, seven tests fail:
> * TestChangePerspective fails on line 39 of test_changes.py

Hmm. Unfortunately that line is a pretty coarse "everything was ok" check.
Look in _trial_temp/test.log and see if any exceptions were raised. I suspect
something went wrong when the Change object was created.

> * SlaveCommandTestCase fails on all the TestShellx tests from
> test_slavecommand.py (some weird DOS execution thing? Will play with
> it a bit more)

Those tests could be failing because of PATH issues, or maybe environment
variables don't behave the same way on win32. Also, the SIGCHLD handler is
set up by calling 'reactor.run()', which is kind of a no-no in trial-based
tests. That should probably be replaced with the SignalMixin technique (as
used by test_vc.py and test_control.py).

> * WebTest fails on test_webPathname with "UNIX support is not present"
>  from deep inside Twisted (I'll

Yeah, that one should be skipped on win32. I've added a check to CVS.

> * The various mail tests (maildir, mailparse) fail from not finding
> the messages in the mail dir - don't think it's being created
> properly.

The test uses os.system("rm -rf"), which should probably be replaced by
shutil.rmtree for portability. Also, many of those tests create Change
objects, so I'd try fixing TestChangePerspective first and see if that fixes
the maildir stuff.

> 3: Running the master server fails due to errors with the signal
> module - it appears that signal on Win32 doesn't support SIGHUP but
> seems to import okay. So I changed the top of master.py, forcing
> signal = None
> and now it runs fine.

I've added another check to skip registering the signal handler if the signal
module doesn't have a 'SIGHUP' attribute.

> 4: The next thing I hit was pifflingly annoying - the buildbot
> "slave" command didn't seem to be passing arguments properly to mktap:

I've filed an upstream bug to get mktap.bat to use %* .. take a look at
<http://www.twistedmatrix.com/users/roundup.twistd/twisted/issue747> if you'd
like to track its progress or chime in.

> 5: At some point I also his various Twisted problems which were solved
> by ensuring that twistd was always running in Win32 mode - so changed
> line 75 of scripts/runner.py to this:
>     cmd = "twistd --reactor=win32 -f buildbot.tap"

I've updated buildbot/scripts/runner.py to add --reactor=win32 when
sys.platform indicates win32-ness.

> 7: Here's the blocker - I'm running the test setup that pulls down
> buildbot from Sourceforge, and this is what happens:

>   File "C:\Python23\Lib\site-packages\buildbot\slave\commands.py",
> line 514, in doCopy
>     return self.copyComplete(None)
> exceptions.AttributeError: CVS instance has no attribute 'copyComplete'

Woo! You win the "first bug in 0.6.0" award :). That was a leftover call from
the pre-"just-chain-the-Deferreds" approach. Fixed in CVS.

Do an update from CVS (well, after sf.net's every-5-hour update job runs) and
see if that takes care of some of those problems.

thanks,
 -Brian




More information about the devel mailing list