~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-02-12 06:24:08 UTC
  • mfrom: (4000.2.4 test-result-registry)
  • Revision ID: pqm@pqm.ubuntu.com-20090212062408-yq0glwncmdzo5uzm
(robertc) Allow plugins to specify test runner classes for
        cmd_selftest. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2912
2912
                     ]
2913
2913
    encoding_type = 'replace'
2914
2914
 
 
2915
    def __init__(self):
 
2916
        Command.__init__(self)
 
2917
        self.additional_selftest_args = {}
 
2918
 
2915
2919
    def run(self, testspecs_list=None, verbose=False, one=False,
2916
2920
            transport=None, benchmark=None,
2917
2921
            lsprof_timed=None, cache_dir=None,
2949
2953
            test_suite_factory = None
2950
2954
            benchfile = None
2951
2955
        try:
2952
 
            result = selftest(verbose=verbose,
2953
 
                              pattern=pattern,
2954
 
                              stop_on_failure=one,
2955
 
                              transport=transport,
2956
 
                              test_suite_factory=test_suite_factory,
2957
 
                              lsprof_timed=lsprof_timed,
2958
 
                              bench_history=benchfile,
2959
 
                              matching_tests_first=first,
2960
 
                              list_only=list_only,
2961
 
                              random_seed=randomize,
2962
 
                              exclude_pattern=exclude,
2963
 
                              strict=strict,
2964
 
                              load_list=load_list,
2965
 
                              debug_flags=debugflag,
2966
 
                              starting_with=starting_with,
2967
 
                              )
 
2956
            selftest_kwargs = {"verbose": verbose,
 
2957
                              "pattern": pattern,
 
2958
                              "stop_on_failure": one,
 
2959
                              "transport": transport,
 
2960
                              "test_suite_factory": test_suite_factory,
 
2961
                              "lsprof_timed": lsprof_timed,
 
2962
                              "bench_history": benchfile,
 
2963
                              "matching_tests_first": first,
 
2964
                              "list_only": list_only,
 
2965
                              "random_seed": randomize,
 
2966
                              "exclude_pattern": exclude,
 
2967
                              "strict": strict,
 
2968
                              "load_list": load_list,
 
2969
                              "debug_flags": debugflag,
 
2970
                              "starting_with": starting_with
 
2971
                              }
 
2972
            selftest_kwargs.update(self.additional_selftest_args)
 
2973
            result = selftest(**selftest_kwargs)
2968
2974
        finally:
2969
2975
            if benchfile is not None:
2970
2976
                benchfile.close()