Index: build/android/pylib/single_test_runner.py |
diff --git a/build/android/pylib/single_test_runner.py b/build/android/pylib/single_test_runner.py |
index 8e51aef5c10d937274f57d7431f19b60f0a65500..2fc266ab480c939a4839277c13da1b8a49e7014a 100644 |
--- a/build/android/pylib/single_test_runner.py |
+++ b/build/android/pylib/single_test_runner.py |
@@ -35,11 +35,13 @@ class SingleTestRunner(BaseTestRunner): |
shard_index: index number of the shard on which the test suite will run. |
dump_debug_info: Whether or not to dump debug information. |
build_type: 'Release' or 'Debug'. |
+ in_webkit_checkout: Whether the suite is being run from a WebKit checkout. |
""" |
def __init__(self, device, test_suite, gtest_filter, test_arguments, timeout, |
rebaseline, performance_test, cleanup_test_files, tool_name, |
- shard_index, dump_debug_info, fast_and_loose, build_type): |
+ shard_index, dump_debug_info, fast_and_loose, build_type, |
+ in_webkit_checkout): |
BaseTestRunner.__init__(self, device, tool_name, shard_index, build_type) |
self._running_on_emulator = self.device.startswith('emulator') |
self._gtest_filter = gtest_filter |
@@ -51,6 +53,7 @@ class SingleTestRunner(BaseTestRunner): |
else: |
self.dump_debug_info = None |
self.fast_and_loose = fast_and_loose |
+ self.in_webkit_checkout = in_webkit_checkout |
logging.warning('Test suite: ' + test_suite) |
if os.path.splitext(test_suite)[1] == '.apk': |
@@ -88,6 +91,13 @@ class SingleTestRunner(BaseTestRunner): |
self.test_package.test_suite_basename + |
'_emulator_additional_disabled') |
+ def _PathToWebKitRoot(self): |
+ """Returns the relative directory to the WebKit checkout, relative to |
bulach
2012/11/15 01:06:39
needs to be one liner.
"""Returns the relative dir
Peter Beverloo
2012/11/15 12:11:29
Done.
|
+ Chrome's src/ directory.""" |
+ if self.in_webkit_checkout: |
+ return os.path.join('..', '..', '..') |
+ return os.path.join('third_party', 'WebKit') |
+ |
def GetDisabledTests(self): |
"""Returns a list of disabled tests. |
@@ -228,7 +238,8 @@ class SingleTestRunner(BaseTestRunner): |
] |
elif self.test_package.test_suite_basename == 'webkit_unit_tests': |
return [ |
- 'third_party/WebKit/Source/WebKit/chromium/tests/data', |
+ ['%s/Source/WebKit/chromium/tests/data' % self._PathToWebKitRoot(), |
+ 'third_party/Source/WebKit/chromium/tests/data'] |
bulach
2012/11/15 01:06:39
ahn, I see... yeah, it seems entirely the wrong le
Peter Beverloo
2012/11/15 12:11:29
Done, I've now put this in a method under StripAnd
|
] |
elif self.test_package.test_suite_basename == 'content_unittests': |
return [ |