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

Elliot Murphy elliot.murphy at veritas.com
Mon Nov 8 20:52:32 UTC 2004


Wow, that was fast. 

|Ok, I think I fixed the test_mailparse issues: the various Change-accepting
|classes now take a "sep" argument, which defaults to "/". As long as the
|CVS
|repository (or other VC server) is running with unix-style path-separators,
|that default is correct. If you manage to get a CVS server running on a
|windows box, then you'll need to flip it to "\\".

Cool, that change makes sense.

|About half of the remaining failures boil down to an atomic-rename
|technique
|that apparently doesn't work on windows:
|
|            pickle.dump(self, open(tmpfilename, "w"), -1)
|            os.rename(tmpfilename, filename)
|
|The os.rename fails.. it would seem that windows wants you to delete the
|old
|file first.
|
|What's the windows idiom for this technique? I want to minimize the window
|during which you could lose builder state. Worst case I can add an
|'os.unlink(filename)' when running under windows (or if the os.rename
|raises
|an OSError), but I'd prefer a better way.

The python docs say that they expect this difference in behavior and there
may not be a way to do the atomic rename under windows if the destination
file already exists. http://www.python.org/doc/2.3/lib/os-file-dir.html.

However, here is something that will work on NT-based Windows systems
(Win2K, XP, etc.), but not on Win95:
win32api.MoveFileEx(src, dst, win32con.MOVEFILE_REPLACE_EXISTING)


|I think the other half of the failures are from ShellCommands that can't be
|run. This boils down to twisted's spawnProcess() running "python" to
|execute
|a local test script (needed for a buildslave, but not by the buildmaster).
|I
|think this has worked on other windows boxes. I'm guessing it's either a
|PATH
|issue or something about the way python is being invoked. Should I maybe be
|using sys.executable instead of a hardwired "python" string? I've attached
|a
|patch for test_slavecommand.py .. let me know if it fixes anything?

I'll try the patch and let you know what I see.
regards,
-elliot
 





More information about the devel mailing list