Rev 4823: (robertc) Fix parallel selftest with subprocesses - needed for win32. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Nov 24 08:28:43 GMT 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4823 [merge]
revision-id: pqm at pqm.ubuntu.com-20091124082841-3ccmfi53fo36ft2k
parent: pqm at pqm.ubuntu.com-20091124031941-4r6i483d98o4eytw
parent: gordon at doxxx.net-20091124051815-3b62q1uvhuoh6kw4
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2009-11-24 08:28:41 +0000
message:
(robertc) Fix parallel selftest with subprocesses - needed for win32.
(Gordon Tyler)
modified:
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py 2009-11-23 01:23:08 +0000
+++ b/bzrlib/tests/__init__.py 2009-11-24 08:28:41 +0000
@@ -3335,13 +3335,17 @@
if not os.path.isfile(bzr_path):
# We are probably installed. Assume sys.argv is the right file
bzr_path = sys.argv[0]
+ bzr_path = [bzr_path]
+ if sys.platform == "win32":
+ # if we're on windows, we can't execute the bzr script directly
+ bzr_path = [sys.executable] + bzr_path
fd, test_list_file_name = tempfile.mkstemp()
test_list_file = os.fdopen(fd, 'wb', 1)
for test in process_tests:
test_list_file.write(test.id() + '\n')
test_list_file.close()
try:
- argv = [bzr_path, 'selftest', '--load-list', test_list_file_name,
+ argv = bzr_path + ['selftest', '--load-list', test_list_file_name,
'--subunit']
if '--no-plugins' in sys.argv:
argv.append('--no-plugins')
More information about the bazaar-commits
mailing list