~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-27 16:55:38 UTC
  • mfrom: (4205.3.5 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090327165538-lustxviiwnrfg2u2
(robertc) Parallel test suite support (Robert Collins,
        Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3187
3187
                            ),
3188
3188
                     Option('list-only',
3189
3189
                            help='List the tests instead of running them.'),
 
3190
                     RegistryOption('parallel',
 
3191
                        help="Run the test suite in parallel.",
 
3192
                        lazy_registry=('bzrlib.tests', 'parallel_registry'),
 
3193
                        value_switches=False,
 
3194
                        ),
3190
3195
                     Option('randomize', type=str, argname="SEED",
3191
3196
                            help='Randomize the order of tests using the given'
3192
3197
                                 ' seed or "now" for the current time.'),
3218
3223
            lsprof_timed=None, cache_dir=None,
3219
3224
            first=False, list_only=False,
3220
3225
            randomize=None, exclude=None, strict=False,
3221
 
            load_list=None, debugflag=None, starting_with=None, subunit=False):
 
3226
            load_list=None, debugflag=None, starting_with=None, subunit=False,
 
3227
            parallel=None):
3222
3228
        from bzrlib.tests import selftest
3223
3229
        import bzrlib.benchmarks as benchmarks
3224
3230
        from bzrlib.benchmarks import tree_creator
3247
3253
                raise errors.BzrCommandError("subunit not available. subunit "
3248
3254
                    "needs to be installed to use --subunit.")
3249
3255
            self.additional_selftest_args['runner_class'] = SubUnitBzrRunner
 
3256
        if parallel:
 
3257
            self.additional_selftest_args.setdefault(
 
3258
                'suite_decorators', []).append(parallel)
3250
3259
        if benchmark:
3251
3260
            test_suite_factory = benchmarks.test_suite
3252
3261
            # Unless user explicitly asks for quiet, be verbose in benchmarks