Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4003)

Unified Diff: build/android/pylib/single_test_runner.py

Issue 11312239: Modify the Android test running scripts so they can be used from WebKit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/forwarder.py ('k') | build/android/run_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3d4ad2dccccdf2a656ee326667b9b4b1ffe78433 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':
@@ -226,10 +229,6 @@ class SingleTestRunner(BaseTestRunner):
'chrome/test/perf/sunspider_uitest.js',
'chrome/test/perf/v8_benchmark_uitest.js',
]
- elif self.test_package.test_suite_basename == 'webkit_unit_tests':
- return [
- 'third_party/WebKit/Source/WebKit/chromium/tests/data',
- ]
elif self.test_package.test_suite_basename == 'content_unittests':
return [
'content/test/data/gpu/webgl_conformance_test_expectations.txt',
@@ -263,6 +262,23 @@ class SingleTestRunner(BaseTestRunner):
self.adb.WaitForSdCardReady(20)
for data in test_data:
self.CopyTestData([data], self.adb.GetExternalStorage())
+ if self.test_package.test_suite_basename == 'webkit_unit_tests':
+ self.PushWebKitUnitTestsData()
+
+ def PushWebKitUnitTestsData(self):
+ """Pushes the webkit_unit_tests data files to the device.
+
+ The path of this directory is different when the suite is being run as
+ part of a WebKit check-out.
+ """
+ webkit_src = os.path.join(constants.CHROME_DIR, 'third_party', 'WebKit')
+ if self.in_webkit_checkout:
+ webkit_src = os.path.join(constants.CHROME_DIR, '..', '..', '..')
+
+ self.adb.PushIfNeeded(
+ '%s/Source/WebKit/chromium/tests/data' % webkit_src,
Peter Beverloo 2012/11/15 12:11:29 q: would having a chain of os.path.join() argument
bulach 2012/11/15 17:46:26 given 280, I think it's more readable.. just to be
Peter Beverloo 2012/11/15 18:02:54 Done.
+ os.path.join(self.adb.GetExternalStorage(),
+ 'third_party/WebKit/Source/WebKit/chromium/tests/data'))
def RunTestsWithFilter(self):
"""Runs a tests via a small, temporary shell script."""
« no previous file with comments | « build/android/pylib/forwarder.py ('k') | build/android/run_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698