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

Unified Diff: build/android/test_runner.py

Issue 2012323002: [Android] Implement perf tests to platform mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unify RunTestsInPlatformMode and move adbd restart Created 4 years, 7 months 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
Index: build/android/test_runner.py
diff --git a/build/android/test_runner.py b/build/android/test_runner.py
index 8f0ac08edfe06ed8d25ed6a43024e5e2ab1e08b4..22a7d634230289bf2491b686806a61c43abd363f 100755
--- a/build/android/test_runner.py
+++ b/build/android/test_runner.py
@@ -594,6 +594,14 @@ def AddPerfTestOptions(parser):
help='Only starts tests when the battery is charged above '
'given level.')
group.add_argument('--known-devices-file', help='Path to known device list.')
+ group.add_argument(
+ '--repeat', dest='repeat', type=int, default=0,
+ help='Number of times to repeat the specified set of tests.')
+ group.add_argument('--break-on-failure', '--break_on_failure',
+ dest='break_on_failure', action='store_true',
+ help='Whether to break on failure.')
+ group.add_argument('--write-buildbot-json', action='store_true',
+ help='Whether to output buildbot json.')
AddCommonOptions(parser)
AddDeviceOptions(parser)
@@ -779,6 +787,7 @@ def _GetAttachedDevices(blacklist_file, test_device, enable_cache, num_retries):
return sorted(attached_devices)
+_DEFAULT_PLATFORM_MODE_TESTS = [' gtest', 'instrumentation', 'perf']
jbudorick 2016/06/07 15:29:28 Again, this CL shouldn't jump perf tests to defaul
rnephew (Reviews Here) 2016/06/09 22:06:39 Thats why I added the do not submit to the name, I
rnephew (Reviews Here) 2016/06/27 20:23:25 Removed it, renaming to reflect that this is gone.
def RunTestsCommand(args): # pylint: disable=too-many-return-statements
"""Checks test type and dispatches to the appropriate function.
@@ -796,8 +805,7 @@ def RunTestsCommand(args): # pylint: disable=too-many-return-statements
ProcessCommonOptions(args)
logging.info('command: %s', ' '.join(sys.argv))
-
- if args.enable_platform_mode or command in ('gtest', 'instrumentation'):
+ if args.enable_platform_mode or command in _DEFAULT_PLATFORM_MODE_TESTS:
return RunTestsInPlatformMode(args)
forwarder.Forwarder.RemoveHostLog()
@@ -826,6 +834,7 @@ _SUPPORTED_IN_PLATFORM_MODE = [
# TODO(jbudorick): Add support for more test types.
'gtest',
'instrumentation',
+ 'perf',
'uirobot',
]

Powered by Google App Engine
This is Rietveld 408576698