| OLD | NEW |
| 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 import glob | 5 import glob |
| 6 import logging | 6 import logging |
| 7 import os | 7 import os |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 import android_commands | 10 from pylib import android_commands |
| 11 from android_commands import errors | 11 from pylib import constants |
| 12 from base_test_runner import BaseTestRunner | 12 from pylib import perf_tests_helper |
| 13 import constants | 13 from pylib.android_commands import errors |
| 14 from pylib.base_test_runner import BaseTestRunner |
| 15 from pylib.test_result import BaseTestResult, TestResults |
| 16 from pylib.utils import run_tests_helper |
| 17 |
| 14 import debug_info | 18 import debug_info |
| 15 import perf_tests_helper | |
| 16 from test_package_apk import TestPackageApk | 19 from test_package_apk import TestPackageApk |
| 17 from test_package_executable import TestPackageExecutable | 20 from test_package_executable import TestPackageExecutable |
| 18 from test_result import BaseTestResult, TestResults | |
| 19 from utils import run_tests_helper | |
| 20 | 21 |
| 21 | 22 |
| 22 class SingleTestRunner(BaseTestRunner): | 23 class SingleTestRunner(BaseTestRunner): |
| 23 """Single test suite attached to a single device. | 24 """Single test suite attached to a single device. |
| 24 | 25 |
| 25 Args: | 26 Args: |
| 26 device: Device to run the tests. | 27 device: Device to run the tests. |
| 27 test_suite: A specific test suite to run, empty to run all. | 28 test_suite: A specific test suite to run, empty to run all. |
| 28 gtest_filter: A gtest_filter flag. | 29 gtest_filter: A gtest_filter flag. |
| 29 test_arguments: Additional arguments to pass to the test binary. | 30 test_arguments: Additional arguments to pass to the test binary. |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 def TearDown(self): | 285 def TearDown(self): |
| 285 """Cleans up the test enviroment for the test suite.""" | 286 """Cleans up the test enviroment for the test suite.""" |
| 286 self.tool.CleanUpEnvironment() | 287 self.tool.CleanUpEnvironment() |
| 287 if self.test_package.cleanup_test_files: | 288 if self.test_package.cleanup_test_files: |
| 288 self.adb.RemovePushedFiles() | 289 self.adb.RemovePushedFiles() |
| 289 if self.dump_debug_info: | 290 if self.dump_debug_info: |
| 290 self.dump_debug_info.StopRecordingLog() | 291 self.dump_debug_info.StopRecordingLog() |
| 291 if self.dump_debug_info: | 292 if self.dump_debug_info: |
| 292 self.dump_debug_info.ArchiveNewCrashFiles() | 293 self.dump_debug_info.ArchiveNewCrashFiles() |
| 293 super(SingleTestRunner, self).TearDown() | 294 super(SingleTestRunner, self).TearDown() |
| OLD | NEW |