/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-11-24 08:28:41 UTC
  • mfrom: (4805.2.2 win32-parallel-selftest)
  • Revision ID: pqm@pqm.ubuntu.com-20091124082841-3ccmfi53fo36ft2k
(robertc) Fix parallel selftest with subprocesses - needed for win32.
        (Gordon Tyler)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3335
3335
        if not os.path.isfile(bzr_path):
3336
3336
            # We are probably installed. Assume sys.argv is the right file
3337
3337
            bzr_path = sys.argv[0]
 
3338
        bzr_path = [bzr_path]
 
3339
        if sys.platform == "win32":
 
3340
            # if we're on windows, we can't execute the bzr script directly
 
3341
            bzr_path = [sys.executable] + bzr_path
3338
3342
        fd, test_list_file_name = tempfile.mkstemp()
3339
3343
        test_list_file = os.fdopen(fd, 'wb', 1)
3340
3344
        for test in process_tests:
3341
3345
            test_list_file.write(test.id() + '\n')
3342
3346
        test_list_file.close()
3343
3347
        try:
3344
 
            argv = [bzr_path, 'selftest', '--load-list', test_list_file_name,
 
3348
            argv = bzr_path + ['selftest', '--load-list', test_list_file_name,
3345
3349
                '--subunit']
3346
3350
            if '--no-plugins' in sys.argv:
3347
3351
                argv.append('--no-plugins')