Ticket #505 (closed defect: duplicate)
win32: CreateProcess: "The directory name is invalid"
| Reported by: | ipv6guru | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | undecided |
| Version: | 0.7.10 | Keywords: | sourceforge 1189752 |
| Cc: |
Description (last modified by dustin) (diff)
This is buildbot 0.6.2
Here's what I did, and what I saw. Unless otherwise noted, all the commands that I typed appeared to work OK. I used "write" to edit the files; whenever I saved them, and it whined about how saving them in "text-only" format would omit any formatting, I just clicked the "Yes" button.
- Installed Python 2.3 on a Windows 2000 machine (from
the .msi file). I accepted all the installer's defaults.
- Installed the "pywin32 extensions", build 159. I
accepted all the installer's defaults. (I can't remember the details, but something doesn't work if the pywin32 extensions aren't installed).
- Installed Twisted 1.3.0 (Python 2.3). I accepted all the
installer's defaults.
- In order to work around
http://twistedmatrix.com/bugs/issue747, I edited c:python23scriptsmktab.bat, by replacing %1 %2 %3 %4 %5 %6 %7 %8 %9 with %*
- I checked buildbot out of CVS like this (around 22
April 2005) cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/buildbot co -P buildbot
- I went to the "My Computer" icon, and added
"c:python23;c:python23scripts" to my PATH.
- I started a new cmd.exe, and "cd"d to the buildbot
directory c:cygwinusrlocalsrcuildbot.
- I typed python setup.py install.
- I "cd"d to c:
- I typed "buildbot master c:b".
- I edited the master.cfg file; I've included it below.
- I typed "buildbot start c:b".
- I pointed my web browser at localhost:8010, and saw a
reasonable-looking web page that said that buildbot-full was offline. (It might also have said that there was no slave; that's reasonable too, since I hadn't yet created one.)
- At another command prompt, I typed buildbot slave
c:bs localhost:9989 bot1name bot1passwd".
- I "cd"d to c:bs, and typed "mkdir info", then "cd
info", then "echo me > admin" and "echo yowza > host".
- I "cd"d to c:, and typed "buildbot start c:bs".
- I went back to the web browser, clicked on
"buildbot-full", and clicked the "Force Build" button.
- I looked at the cmd.exe in which I'd started the
slave; it showed a stack trace which ended with an error from CreateProcess?: "The directory name is invalid". Unfortunately, I couldn't see the name of the invalid directory anywhere in the stack trace.
There was no evidence that the build actually ran.
I've got a workaround, though:
#! diff @@ -293,6 +293,11 @@ # create the process cmdline = "%s %s" % (command, string.join(args[1:], ' ')) + + # Create the build directory if it doesn't already exist. + if not os.path.isdir (path): + os.mkdir (path) + self.hProcess, hThread, dwPid, dwTid = win32process.CreateProcess(None, cmdline, None, None, 1, 0, environment, path, StartupInfo) # close handles which only the child will use
Diff finished. Mon Apr 25 12:14:24 2005
With the above patch, everything seems to work reasonably.
Master.cfg:
#! /usr/bin/python
import os.path
from buildbot.process import step, factory
from buildbot.status import html
s = factory.s
c = {}
c['bots'] = [("bot1name", "bot1passwd")]
c['sources'] = []
builders = []
f1 = factory.BuildFactory([s(step.ShellCommand,
command=["c:/perl/bin/perl",
"d:\data\trunk\sdk\vhmake.pl"]),
s(step.ShellCommand,
command=["c:/perl/bin/perl",
"d:\data\trunk\sdk\run-all-tests.pl"])
])
b1 = {'name': "buildbot-full",
'slavename': "bot1name",
'builddir': "full",
'factory': f1,
}
c['builders'] = [b1]
c['slavePortnum'] = 9989
c['status'] = []
c['status'].append(html.Waterfall(http_port=8010))
c['debugPassword'] = "debugpassword"
c['projectName'] = "Buildbot"
c['projectURL'] = "http://buildbot.sourceforge.net/"
c['buildbotURL'] = "http://localhost:8080/"
BuildmasterConfig = c
Submitted: Eric Hanchrow ( offby1 ) - 2005-04-26 03:40
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
Moved from sourceforge