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

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

Issue 693943003: Update from https://crrev.com/302630 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 """Create a new TestRunner. 59 """Create a new TestRunner.
60 60
61 Args: 61 Args:
62 test_options: An InstrumentationOptions object. 62 test_options: An InstrumentationOptions object.
63 device: Attached android device. 63 device: Attached android device.
64 shard_index: Shard index. 64 shard_index: Shard index.
65 test_pkg: A TestPackage object. 65 test_pkg: A TestPackage object.
66 additional_flags: A list of additional flags to add to the command line. 66 additional_flags: A list of additional flags to add to the command line.
67 """ 67 """
68 super(TestRunner, self).__init__(device, test_options.tool, 68 super(TestRunner, self).__init__(device, test_options.tool,
69 test_options.push_deps,
70 test_options.cleanup_test_files) 69 test_options.cleanup_test_files)
71 self._lighttp_port = constants.LIGHTTPD_RANDOM_PORT_FIRST + shard_index 70 self._lighttp_port = constants.LIGHTTPD_RANDOM_PORT_FIRST + shard_index
72 71
73 self.coverage_device_file = None 72 self.coverage_device_file = None
74 self.coverage_dir = test_options.coverage_dir 73 self.coverage_dir = test_options.coverage_dir
75 self.coverage_host_file = None 74 self.coverage_host_file = None
76 self.options = test_options 75 self.options = test_options
77 self.test_pkg = test_pkg 76 self.test_pkg = test_pkg
78 # Use the correct command line file for the package under test. 77 # Use the correct command line file for the package under test.
79 cmdline_file = [a.cmdline_file for a in constants.PACKAGE_INFO.itervalues() 78 cmdline_file = [a.cmdline_file for a in constants.PACKAGE_INFO.itervalues()
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 except device_errors.CommandTimeoutError as e: 507 except device_errors.CommandTimeoutError as e:
509 results.AddResult(test_result.InstrumentationTestResult( 508 results.AddResult(test_result.InstrumentationTestResult(
510 test, base_test_result.ResultType.TIMEOUT, start_ms, duration_ms, 509 test, base_test_result.ResultType.TIMEOUT, start_ms, duration_ms,
511 log=str(e) or 'No information')) 510 log=str(e) or 'No information'))
512 except device_errors.DeviceUnreachableError as e: 511 except device_errors.DeviceUnreachableError as e:
513 results.AddResult(test_result.InstrumentationTestResult( 512 results.AddResult(test_result.InstrumentationTestResult(
514 test, base_test_result.ResultType.CRASH, start_ms, duration_ms, 513 test, base_test_result.ResultType.CRASH, start_ms, duration_ms,
515 log=str(e) or 'No information')) 514 log=str(e) or 'No information'))
516 self.TestTeardown(test, results) 515 self.TestTeardown(test, results)
517 return (results, None if results.DidRunPass() else test) 516 return (results, None if results.DidRunPass() else test)
OLDNEW
« no previous file with comments | « build/android/pylib/instrumentation/test_options.py ('k') | build/android/pylib/linker/setup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698