summaryrefslogtreecommitdiff
path: root/Tools/Scripts/webkitpy/test/main.py
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-17 16:21:14 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-17 16:21:14 +0200
commit8995b83bcbfbb68245f779b64e5517627c6cc6ea (patch)
tree17985605dab9263cc2444bd4d45f189e142cca7c /Tools/Scripts/webkitpy/test/main.py
parentb9c9652036d5e9f1e29c574f40bc73a35c81ace6 (diff)
downloadqtwebkit-8995b83bcbfbb68245f779b64e5517627c6cc6ea.tar.gz
Imported WebKit commit cf4f8fc6f19b0629f51860cb2d4b25e139d07e00 (http://svn.webkit.org/repository/webkit/trunk@131592)
New snapshot that includes the build fixes for Mac OS X 10.6 and earlier as well as the previously cherry-picked changes
Diffstat (limited to 'Tools/Scripts/webkitpy/test/main.py')
-rw-r--r--Tools/Scripts/webkitpy/test/main.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/Tools/Scripts/webkitpy/test/main.py b/Tools/Scripts/webkitpy/test/main.py
index 28de8a6e0..852413299 100644
--- a/Tools/Scripts/webkitpy/test/main.py
+++ b/Tools/Scripts/webkitpy/test/main.py
@@ -81,7 +81,7 @@ class Tester(object):
def skip(self, names, reason, bugid):
self.finder.skip(names, reason, bugid)
- def _parse_args(self):
+ def _parse_args(self, argv=None):
parser = optparse.OptionParser(usage='usage: %prog [options] [args...]')
parser.add_option('-a', '--all', action='store_true', default=False,
help='run all the tests')
@@ -103,7 +103,7 @@ class Tester(object):
parser.epilog = ('[args...] is an optional list of modules, test_classes, or individual tests. '
'If no args are given, all the tests will be run.')
- return parser.parse_args()
+ return parser.parse_args(argv)
def run(self):
self._options, args = self._parse_args()
@@ -188,10 +188,15 @@ class Tester(object):
loader.test_method_prefixes = []
serial_tests = []
- loader.test_method_prefixes.extend(['serial_test_', 'serial_integration_test_'])
+ loader.test_method_prefixes = ['serial_test_', 'serial_integration_test_']
for name in names:
serial_tests.extend(self._all_test_names(loader.loadTestsFromName(name, None)))
+ # loader.loadTestsFromName() will not verify that names begin with one of the test_method_prefixes
+ # if the names were explicitly provided (e.g., MainTest.test_basic), so this means that any individual
+ # tests will be included in both parallel_tests and serial_tests, and we need to de-dup them.
+ serial_tests = list(set(serial_tests).difference(set(parallel_tests)))
+
return (parallel_tests, serial_tests)
def _all_test_names(self, suite):