Bug in RedirectedExecutable.Spawn on Windows (QMTest 2.3)
Peter Gerell
qmtest at gerell.se
Tue Sep 5 09:54:39 UTC 2006
Hi,
a comment in executable.py claims that the PATH environment variable will be
used to find the executable if the path parameter contains no directory
separators.
This is not the case on Windows. The PATH is only used if the first
parameter to win32process.CreateProcess is None. At least from what I can
see from my experiments. This also makes sense as I assume that
win32process.CreateProcess thin wrapper around Createprocess in the Windows
API.
My solution was to comment out the assignment of arg0 to the path and to
make the normalization conditional. Then the PATH is used if I pass None as
path and the name of the executable in arguments[0].
In RedirectedExecutable.Spawn:
#if not path:
# path = arguments[0]
if path:
# Normalize the path name.
/Peter Gerell
More information about the qmtest
mailing list