selftest --parallel=fork fails on win32 because os does not have fork()

Bug #528730 reported by Gordon Tyler
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Wishlist
Martin Packman

Bug Description

'bzr selftest --no-plugins --parallel=fork' fails on win32 (Win7 64-bit on Core i7) with the following error:

Traceback (most recent call last):
  File "C:\dev\bzr\bzr.dev\bzrlib\commands.py", line 833, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "C:\dev\bzr\bzr.dev\bzrlib\commands.py", line 1036, in run_bzr
    ret = run(*run_argv)
  File "C:\dev\bzr\bzr.dev\bzrlib\commands.py", line 641, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "C:\dev\bzr\bzr.dev\bzrlib\commands.py", line 645, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "C:\dev\bzr\bzr.dev\bzrlib\cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "C:\dev\bzr\bzr.dev\bzrlib\cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "C:\dev\bzr\bzr.dev\bzrlib\builtins.py", line 3594, in run
    result = selftest(**selftest_kwargs)
  File "C:\dev\bzr\bzr.dev\bzrlib\tests\__init__.py", line 3416, in selftest
    result_decorators=result_decorators,
  File "C:\dev\bzr\bzr.dev\bzrlib\tests\__init__.py", line 2950, in run_suite
    result = runner.run(suite)
  File "C:\dev\bzr\bzr.dev\bzrlib\tests\__init__.py", line 648, in run
    test.run(result)
  File "C:\Python26\lib\site-packages\testtools\testsuite.py", line 49, in run
    tests = self.make_tests(self)
  File "C:\dev\bzr\bzr.dev\bzrlib\tests\__init__.py", line 3194, in fork_for_tests
    pid = os.fork()
AttributeError: 'module' object has no attribute 'fork'

Bazaar (bzr) 2.2.0dev1
  from bzr checkout C:/dev/bzr/bzr.dev
    revision: 5059
    revid: <email address hidden>
    branch nick: bzr.dev
  Python interpreter: C:\Python26\python.exe 2.6.4
  Python standard library: C:\Python26\lib
  Platform: Windows-post2008Server-6.1.7600
  bzrlib: C:\dev\bzr\bzr.dev\bzrlib
  Bazaar configuration: C:\Users\Owner\AppData\Roaming\bazaar\2.0
  Bazaar log file: C:\Users\Owner\Documents\.bzr.log

Related branches

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 528730] [NEW] selftest --parallel=fork fails on win32 because os does not have fork()

 status invalid

On win32 you can use --parallel=subprocess

cheers,
Rob

Changed in bzr:
status: New → Invalid
Revision history for this message
Matt Nordhoff (mnordhoff) wrote :

Should probably have a nice error message instead of a traceback, though. :-\

Revision history for this message
Vincent Ladeuil (vila) wrote :

That's what he does.
An error message will be more dev-friendly than a backtrace though.

Changed in bzr:
importance: Undecided → Wishlist
status: Invalid → Confirmed
Martin Packman (gz)
Changed in bzr:
assignee: nobody → Martin [gz] (gz)
milestone: none → 2.3b1
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.