[Bug] bzr selftest cleanup is broken on win32 (again)

John Arbash Meinel john at arbash-meinel.com
Tue Sep 5 14:30:45 BST 2006

Alexander Belchenko wrote:
> Alexander Belchenko пишет:
>> Here is result of running selftest on win32 with fresh bzr.dev revno.1982
>> Ran 3329 tests in 1727.695s
>> FAILED (failures=33, errors=41)
> Too many tests have similar error messages:
> ======================================================================
> ERROR: test_external_diff (bzrlib.tests.test_diff.TestDiff)
> vvvv[log from
> bzrlib.tests.test_diff.TestDiff.test_external_diff]-------------
> ^^^^[log from
> bzrlib.tests.test_diff.TestDiff.test_external_diff]-------------
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "D:\Bazaar\sandbox\bzr.dev\bzrlib\tests\test_diff.py", line 101,
> in test_external_diff
>     lines = external_udiff_lines(['boo\n'], ['goo\n'])
>   File "D:\Bazaar\sandbox\bzr.dev\bzrlib\tests\test_diff.py", line 44,
> in external_udiff_lines
>     external_diff('old', old, 'new', new, output, diff_opts=['-u'])
>   File "D:\Bazaar\sandbox\bzr.dev\bzrlib\diff.py", line 185, in
> external_diff
>     pipe = _spawn_external_diff(diffcmd, capture_errors=True)
>   File "D:\Bazaar\sandbox\bzr.dev\bzrlib\diff.py", line 117, in
> _spawn_external_diff
>     preexec_fn=preexec_fn)
>   File "E:\Python24\lib\subprocess.py", line 497, in __init__
>     raise ValueError("preexec_fn is not supported on Windows "
> ValueError: preexec_fn is not supported on Windows platforms

I'll write a fix for this right away. It is because 'run_bzr_subprocess'
can now clean up the environment in the child process. However, if we
don't have preexec_fn, then we have to clean them up in the parent, and
then spawn the child.

This really sucks. I thought the whole point of subprocess was to make
the platforms more similar, but half of the optional parameters aren't
supported on windows. (close_fds, and now preexec_fn).

Anyway, I know where the bug is, and I can probably fix it cleanly.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060905/a968994d/attachment.pgp 

More information about the bazaar mailing list