Index: build/android/pylib/instrumentation/test_runner.py |
diff --git a/build/android/pylib/instrumentation/test_runner.py b/build/android/pylib/instrumentation/test_runner.py |
index 6bb77e669e4f87a40c43a603048c7c3ff1d49679..dda8162ba6c12d44af20fc5ec3540bd39994911f 100644 |
--- a/build/android/pylib/instrumentation/test_runner.py |
+++ b/build/android/pylib/instrumentation/test_runner.py |
@@ -10,6 +10,12 @@ import re |
import sys |
import time |
+ |
+sys.path.append(os.path.join(sys.path[0], |
+ os.pardir, os.pardir, 'build', 'util', 'lib', |
+ 'common')) |
+import perf_tests_results_helper |
+ |
from pylib import android_commands |
from pylib import constants |
from pylib import flag_changer |
@@ -17,12 +23,8 @@ from pylib import valgrind_tools |
from pylib.base import base_test_result |
from pylib.base import base_test_runner |
from pylib.instrumentation import json_perf_parser |
-from pylib.instrumentation import test_result |
-sys.path.append(os.path.join(sys.path[0], |
- os.pardir, os.pardir, 'build', 'util', 'lib', |
- 'common')) |
-import perf_tests_results_helper # pylint: disable=F0401 |
+import test_result |
_PERF_TEST_ANNOTATION = 'PerfTest' |
@@ -71,11 +73,9 @@ class TestRunner(base_test_runner.BaseTestRunner): |
test_options.cleanup_test_files) |
self._lighttp_port = constants.LIGHTTPD_RANDOM_PORT_FIRST + shard_index |
- self.coverage_device_file = None |
- self.coverage_dir = test_options.coverage_dir |
- self.coverage_host_file = None |
self.options = test_options |
self.test_pkg = test_pkg |
+ self.coverage_dir = test_options.coverage_dir |
# Use the correct command line file for the package under test. |
cmdline_file = [a.cmdline_file for a in constants.PACKAGE_INFO.itervalues() |
if a.test_package == self.test_pkg.GetPackageName()] |
@@ -112,7 +112,7 @@ class TestRunner(base_test_runner.BaseTestRunner): |
# TODO(frankf): Specify test data in this file as opposed to passing |
# as command-line. |
for dest_host_pair in self.options.test_data: |
- dst_src = dest_host_pair.split(':', 1) |
+ dst_src = dest_host_pair.split(':',1) |
dst_layer = dst_src[0] |
host_src = dst_src[1] |
host_test_files_path = '%s/%s' % (constants.DIR_SOURCE_ROOT, host_src) |
@@ -152,7 +152,7 @@ class TestRunner(base_test_runner.BaseTestRunner): |
# We give different default value to launch HTTP server based on shard index |
# because it may have race condition when multiple processes are trying to |
# launch lighttpd with same port at same time. |
- self.LaunchTestHttpServer( |
+ http_server_ports = self.LaunchTestHttpServer( |
os.path.join(constants.DIR_SOURCE_ROOT), self._lighttp_port) |
if self.flags: |
self.flags.AddFlags(['--disable-fre', '--enable-test-intents']) |
@@ -332,9 +332,9 @@ class TestRunner(base_test_runner.BaseTestRunner): |
raw_result = None |
start_date_ms = None |
results = base_test_result.TestRunResults() |
- timeout = (self._GetIndividualTestTimeoutSecs(test) * |
- self._GetIndividualTestTimeoutScale(test) * |
- self.tool.GetTimeoutScale()) |
+ timeout=(self._GetIndividualTestTimeoutSecs(test) * |
+ self._GetIndividualTestTimeoutScale(test) * |
+ self.tool.GetTimeoutScale()) |
try: |
self.TestSetup(test) |
start_date_ms = int(time.time()) * 1000 |