summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/webkitpy/test
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-09-30 15:42:16 +0100
committerSteve Block <steveblock@google.com>2010-10-07 10:59:29 +0100
commitbec39347bb3bb5bf1187ccaf471d26247f28b585 (patch)
tree56bdc4c2978fbfd3d79d0d36d5d6c640ecc09cc8 /WebKitTools/Scripts/webkitpy/test
parent90b7966e7815b262cd19ac25f03aaad9b21fdc06 (diff)
downloadexternal_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.zip
external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.tar.gz
external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.tar.bz2
Merge WebKit at r68651 : Initial merge by git.
Change-Id: I3d6bff59f17eedd6722723354f386fec9be8ad12
Diffstat (limited to 'WebKitTools/Scripts/webkitpy/test')
-rw-r--r--WebKitTools/Scripts/webkitpy/test/main.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/WebKitTools/Scripts/webkitpy/test/main.py b/WebKitTools/Scripts/webkitpy/test/main.py
index daf255f..9351768 100644
--- a/WebKitTools/Scripts/webkitpy/test/main.py
+++ b/WebKitTools/Scripts/webkitpy/test/main.py
@@ -78,7 +78,7 @@ class Tester(object):
return modules
- def run_tests(self, sys_argv):
+ def run_tests(self, sys_argv, external_package_paths=None):
"""Run the unit tests in all *_unittest.py modules in webkitpy.
This method excludes "webkitpy.common.checkout.scm_unittest" unless
@@ -88,6 +88,11 @@ class Tester(object):
sys_argv: A reference to sys.argv.
"""
+ if external_package_paths is None:
+ external_package_paths = []
+ else:
+ sys.path.extend(set(os.path.dirname(path) for path in external_package_paths))
+
if len(sys_argv) > 1 and not sys_argv[-1].startswith("-"):
# Then explicit modules or test names were provided, which
# the unittest module is equipped to handle.
@@ -97,9 +102,10 @@ class Tester(object):
# Otherwise, auto-detect all unit tests.
webkitpy_dir = os.path.dirname(webkitpy.__file__)
- unittest_paths = self._find_unittest_files(webkitpy_dir)
- modules = self._modules_from_paths(webkitpy_dir, unittest_paths)
+ modules = []
+ for path in [webkitpy_dir] + external_package_paths:
+ modules.extend(self._modules_from_paths(path, self._find_unittest_files(path)))
modules.sort()
# This is a sanity check to ensure that the unit-test discovery