Lenard,
Weird, XP? Vista? I'm on XP SP3
By passing an env = {} to the Popen constructor temporarily to remove
PATH from the environment it fails my end.
D:\Nick\PyGame\trunk>run_tests.py -s
No way of killing unruly processes. Try installing sysinternals pskill
and placi
ng on %PATH%.
I found a recipe for TerminateProcess, but it didn't kill child
processes so it would stop the run_tests from hanging but on mine at
least, python would call cmd which would in turn call python. It would
only kill cmd.exe, leaving python to run rampant.
cmd
python run_tests.py
cmd
python xxxx_test.py
But yeah, we really need it to be consistent however it works. It would
be nice if it would kill process trees also.
You are more than welcome to make any changes.
To run a test_suite with a test that "while True: pass"
$ run_tests.py -s -f infinite_loop
I have been meaning to add that to the run_tests test.
Cheers
Lenard Lindstrom wrote:
Hi,
I tried running the tests in subprocess mode an everything passed.
Great, except I didn't have either pskill or taskkill installed. When
checking for the programs Popen.wait() always returned 0, even when
the program was not found. So it incorrectly assumed I had pskill
installed (first in the list). Anyway, since pywin32 is already
required, why not do the TerminateProcess system call directly, making
pskill or taskkill unnecessary. If interested I can making the
necessary changes to async_sub.py.
Lenard
Nicholas Dudfield wrote:
Greetings all,
I recently gave the run_tests.py a bit of an upgrade to run each test
in subprocesses. I wrote some tests and I think it's ready to use on
the build page. (It requires win32file and win32pipe though on windows)
There is a post on my blog that goes into a little bit of detail.
Also a post re: the stub generator.
* http://blog.akalias.net/2008/07/subprocessed.html
* http://blog.akalias.net/2008/07/stubby.html