python version-specific codepaths in tests

Gordon Tyler gordon at doxxx.net
Fri Nov 20 06:40:42 GMT 2009


Gordon Tyler wrote:
> John Arbash Meinel wrote:
>> I would make sure it works first. If SIGTERM is built on
>> TerminateProcess, I think it works, but I'd want to make sure it doesn't
>> kill the testing process.
> 
> I've been using it this evening while adding a test for bzr serve. All
> the bzr serve tests seem to work fine on win32. Haven't tested it on
> non-win32 yet.
> 
> There is a wee snag though: the tests which make use of
> finish_bzr_subprocess' signalling capability use SIGINT, to simulate a
> user pressing Ctrl-C I'm guessing. The Win32 implementation of
> Popen.send_signal only allows SIGTERM. I could make it translate SIGINT
> to SIGTERM but that changes bzr's output (no 'bzr: interrupted'). I'm
> wondering if it's important enough to simulate user interruption in
> those cases or if it's acceptable to use SIGTERM in those tests instead.

I've pushed my changes up to lp:~doxxx/bzr/tests-win32-signals. Some of
the 'bzr serve' tests are broken on non-win32 because when SIGTERM'd
their retcode is -15, not 1 as it is on win32. Not sure what to do about
this. Could use retcode=None to ignore the retcode...

Ciao,
Gordon




More information about the bazaar mailing list