[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] run_tests.py subprocess mode and Build Page extensions
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] run_tests.py subprocess mode and Build Page extensions
- From: Nicholas Dudfield <ndudfield@xxxxxxxxx>
- Date: Tue, 08 Jul 2008 11:51:54 +1000
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Mon, 07 Jul 2008 21:52:04 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=jy+2T8XWl/z81Sv8eWCczeb5fcvNkrcESZoIIn8cNHI=; b=gMD1jQxhCoPvhpTtDj+G1qTgPd7M4ye5G7X7MSHkYk11QOJ2BPxnGqT2TZhOON828c rFIK0uXwNjwac2sQP06rjXi8D0TsdzgRfNmLZiz3Vm4q3jrF0km1vYR1DvpjcjqLeEHC qhqFIgvHOFbTDNTB0lfFlob51ToBQ+vAla/h0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=HjWowfvLEEueJowcvQnRWmVnL+AhCRHu2tMrd4mUHUOOfPnfoB6JkSJR/1pf7DkF5m Vhp6abgi0eyclbW0b+lqIOoZcJICOmt3pCMkbCss58om8hoODT22sFUejT83DRqC5XyY 0RqSa3W3pN6M7j7xm/WFikIV1FLyw8OUObm7M=
- In-reply-to: <48725541.8040608@xxxxxxxxx>
- References: <4871CA9C.6010807@xxxxxxxxx> <48725541.8040608@xxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
- User-agent: Thunderbird 2.0.0.14 (Windows/20080421)
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