summaryrefslogtreecommitdiff
path: root/Tools/Scripts/webkitpy/test/main.py
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-15 16:08:57 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-15 16:08:57 +0200
commit5466563f4b5b6b86523e3f89bb7f77e5b5270c78 (patch)
tree8caccf7cd03a15207cde3ba282c88bf132482a91 /Tools/Scripts/webkitpy/test/main.py
parent33b26980cb24288b5a9f2590ccf32a949281bb79 (diff)
downloadqtwebkit-5466563f4b5b6b86523e3f89bb7f77e5b5270c78.tar.gz
Imported WebKit commit 0dc6cd75e1d4836eaffbb520be96fac4847cc9d2 (http://svn.webkit.org/repository/webkit/trunk@131300)
WebKit update which introduces the QtWebKitWidgets module that contains the WK1 widgets based API. (In fact it renames QtWebKit to QtWebKitWidgets while we're working on completing the entire split as part of https://bugs.webkit.org/show_bug.cgi?id=99314
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):