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

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: [Android] Implement perf tests to platform mode. Created 4 years, 5 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 8ca3ed74020253ccd7df5dd805be8c2a30b14d7d..8888f623a6200e109dfa310cacf03e7bfab0eab0 100755
--- a/build/android/test_runner.py
+++ b/build/android/test_runner.py
@@ -569,9 +569,15 @@ def AddPerfTestOptions(parser):
'--output-chartjson-data',
default='',
help='Write out chartjson into the given file.')
+ # TODO(rnephew): Remove this when everything moves to new option in platform
+ # mode.
group.add_argument(
'--get-output-dir-archive', metavar='FILENAME',
- help='Write the chached output directory archived by a step into the'
+ help='Write the cached output directory archived by a step into the'
+ ' given ZIP file.')
+ group.add_argument(
+ '--output-dir-archive-path', metavar='FILENAME',
+ help='Write the cached output directory archived by a step into the'
' given ZIP file.')
group.add_argument(
'--flaky-steps',
@@ -592,12 +598,23 @@ def AddPerfTestOptions(parser):
'--max-battery-temp', type=int,
help='Only start tests when the battery is at or below the given '
'temperature (0.1 C)')
- group.add_argument('single_step_command', nargs='*', action=SingleStepAction,
- help='If --single-step is specified, the command to run.')
- group.add_argument('--min-battery-level', type=int,
- help='Only starts tests when the battery is charged above '
- 'given level.')
+ group.add_argument(
+ 'single_step_command', nargs='*', action=SingleStepAction,
+ help='If --single-step is specified, the command to run.')
+ group.add_argument(
+ '--min-battery-level', type=int,
+ 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)
@@ -783,6 +800,10 @@ def _GetAttachedDevices(blacklist_file, test_device, enable_cache, num_retries):
return sorted(attached_devices)
+# TODO(rnephew): Add perf when ready to switch to platform mode as default.
+_DEFAULT_PLATFORM_MODE_TESTS = ['gtest', 'instrumentation']
+
+
def RunTestsCommand(args): # pylint: disable=too-many-return-statements
"""Checks test type and dispatches to the appropriate function.
@@ -800,8 +821,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()
@@ -830,6 +850,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