Rev 5926: Support multiple selftest --exclude options in file:///home/vila/src/bzr/bugs/746991-selftest-exclude-ored/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Fri May 27 14:11:36 UTC 2011
At file:///home/vila/src/bzr/bugs/746991-selftest-exclude-ored/
------------------------------------------------------------
revno: 5926
revision-id: v.ladeuil+lp at free.fr-20110527141136-mg4uf6fdap6e58l8
parent: v.ladeuil+lp at free.fr-20110527134919-50ib2jcwlg5fn62t
fixes bug(s): https://launchpad.net/bugs/746991
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 746991-selftest-exclude-ored
timestamp: Fri 2011-05-27 16:11:36 +0200
message:
Support multiple selftest --exclude options
-------------- next part --------------
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2011-05-20 14:39:50 +0000
+++ b/bzrlib/builtins.py 2011-05-27 14:11:36 +0000
@@ -3691,10 +3691,10 @@
Option('randomize', type=str, argname="SEED",
help='Randomize the order of tests using the given'
' seed or "now" for the current time.'),
- Option('exclude', type=str, argname="PATTERN",
- short_name='x',
- help='Exclude tests that match this regular'
- ' expression.'),
+ ListOption('exclude', type=str, argname="PATTERN",
+ short_name='x',
+ help='Exclude tests that match this regular'
+ ' expression.'),
Option('subunit',
help='Output test progress via subunit.'),
Option('strict', help='Fail on missing dependencies or '
@@ -3751,6 +3751,10 @@
"--benchmark is no longer supported from bzr 2.2; "
"use bzr-usertest instead")
test_suite_factory = None
+ if not exclude:
+ exclude_pattern = None
+ else:
+ exclude_pattern = '(' + '|'.join(exclude) + ')'
selftest_kwargs = {"verbose": verbose,
"pattern": pattern,
"stop_on_failure": one,
@@ -3761,7 +3765,7 @@
"matching_tests_first": first,
"list_only": list_only,
"random_seed": randomize,
- "exclude_pattern": exclude,
+ "exclude_pattern": exclude_pattern,
"strict": strict,
"load_list": load_list,
"debug_flags": debugflag,
=== modified file 'doc/en/release-notes/bzr-2.4.txt'
--- a/doc/en/release-notes/bzr-2.4.txt 2011-05-27 09:01:29 +0000
+++ b/doc/en/release-notes/bzr-2.4.txt 2011-05-27 14:11:36 +0000
@@ -62,6 +62,8 @@
suite. This can include new facilities for writing tests, fixes to
spurious test failures and changes to the way things should be tested.
+* Multiple ``selftest --exclude`` options are now combined instead of
+ overriding each other. (Vincent Ladeuil, #746991)
bzr 2.4b3
#########
More information about the bazaar-commits
mailing list