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

Side by Side Diff: build/android/pylib/instrumentation/test_runner.py

Issue 745793002: Add AMP support to test runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix pylint in pylib/instrumentation/t_r Created 6 years 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 unified diff | Download patch
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Class for running instrumentation tests on a single device.""" 5 """Class for running instrumentation tests on a single device."""
6 6
7 import logging 7 import logging
8 import os 8 import os
9 import re 9 import re
10 import sys 10 import sys
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 return 10 * 60 292 return 10 * 60
293 if 'EnormousTest' in annotations: 293 if 'EnormousTest' in annotations:
294 return 10 * 60 294 return 10 * 60
295 if 'LargeTest' in annotations or _PERF_TEST_ANNOTATION in annotations: 295 if 'LargeTest' in annotations or _PERF_TEST_ANNOTATION in annotations:
296 return 5 * 60 296 return 5 * 60
297 if 'MediumTest' in annotations: 297 if 'MediumTest' in annotations:
298 return 3 * 60 298 return 3 * 60
299 if 'SmallTest' in annotations: 299 if 'SmallTest' in annotations:
300 return 1 * 60 300 return 1 * 60
301 301
302 logging.warn(("Test size not found in annotations for test '{0}', using " + 302 logging.warn(("Test size not found in annotations for test '%s', using " +
303 "1 minute for timeout.").format(test)) 303 "1 minute for timeout.") % test)
304 return 1 * 60 304 return 1 * 60
305 305
306 def _RunTest(self, test, timeout): 306 def _RunTest(self, test, timeout):
307 """Runs a single instrumentation test. 307 """Runs a single instrumentation test.
308 308
309 Args: 309 Args:
310 test: Test class/method. 310 test: Test class/method.
311 timeout: Timeout time in seconds. 311 timeout: Timeout time in seconds.
312 312
313 Returns: 313 Returns:
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 except device_errors.CommandTimeoutError as e: 464 except device_errors.CommandTimeoutError as e:
465 results.AddResult(test_result.InstrumentationTestResult( 465 results.AddResult(test_result.InstrumentationTestResult(
466 test, base_test_result.ResultType.TIMEOUT, start_ms, duration_ms, 466 test, base_test_result.ResultType.TIMEOUT, start_ms, duration_ms,
467 log=str(e) or 'No information')) 467 log=str(e) or 'No information'))
468 except device_errors.DeviceUnreachableError as e: 468 except device_errors.DeviceUnreachableError as e:
469 results.AddResult(test_result.InstrumentationTestResult( 469 results.AddResult(test_result.InstrumentationTestResult(
470 test, base_test_result.ResultType.CRASH, start_ms, duration_ms, 470 test, base_test_result.ResultType.CRASH, start_ms, duration_ms,
471 log=str(e) or 'No information')) 471 log=str(e) or 'No information'))
472 self.TestTeardown(test, results) 472 self.TestTeardown(test, results)
473 return (results, None if results.DidRunPass() else test) 473 return (results, None if results.DidRunPass() else test)
OLDNEW
« no previous file with comments | « build/android/pylib/gtest/gtest_test_instance.py ('k') | build/android/pylib/remote/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698