~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Vincent Ladeuil
  • Date: 2011-05-27 14:11:36 UTC
  • mto: This revision was merged to the branch mainline in revision 5930.
  • Revision ID: v.ladeuil+lp@free.fr-20110527141136-mg4uf6fdap6e58l8
Support multiple selftest --exclude options

Show diffs side-by-side

added added

removed removed

Lines of Context:
3691
3691
                     Option('randomize', type=str, argname="SEED",
3692
3692
                            help='Randomize the order of tests using the given'
3693
3693
                                 ' seed or "now" for the current time.'),
3694
 
                     Option('exclude', type=str, argname="PATTERN",
3695
 
                            short_name='x',
3696
 
                            help='Exclude tests that match this regular'
3697
 
                                 ' expression.'),
 
3694
                     ListOption('exclude', type=str, argname="PATTERN",
 
3695
                                short_name='x',
 
3696
                                help='Exclude tests that match this regular'
 
3697
                                ' expression.'),
3698
3698
                     Option('subunit',
3699
3699
                        help='Output test progress via subunit.'),
3700
3700
                     Option('strict', help='Fail on missing dependencies or '
3751
3751
                "--benchmark is no longer supported from bzr 2.2; "
3752
3752
                "use bzr-usertest instead")
3753
3753
        test_suite_factory = None
 
3754
        if not exclude:
 
3755
            exclude_pattern = None
 
3756
        else:
 
3757
            exclude_pattern = '(' + '|'.join(exclude) + ')'
3754
3758
        selftest_kwargs = {"verbose": verbose,
3755
3759
                          "pattern": pattern,
3756
3760
                          "stop_on_failure": one,
3761
3765
                          "matching_tests_first": first,
3762
3766
                          "list_only": list_only,
3763
3767
                          "random_seed": randomize,
3764
 
                          "exclude_pattern": exclude,
 
3768
                          "exclude_pattern": exclude_pattern,
3765
3769
                          "strict": strict,
3766
3770
                          "load_list": load_list,
3767
3771
                          "debug_flags": debugflag,