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

Unified Diff: build/android/pylib/single_test_runner.py

Issue 10914199: Android: upstream latest changes for build/android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « build/android/pylib/run_java_tests.py ('k') | build/android/pylib/test_package.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/single_test_runner.py
diff --git a/build/android/pylib/single_test_runner.py b/build/android/pylib/single_test_runner.py
index e43b08b3ccbdf89a82e85b2fbd75d7d4da875e17..0a2b087b885cbf65ffb257f570a28dedbed35aba 100644
--- a/build/android/pylib/single_test_runner.py
+++ b/build/android/pylib/single_test_runner.py
@@ -10,6 +10,7 @@ import sys
from base_test_runner import BaseTestRunner
import debug_info
import constants
+import perf_tests_helper
import run_tests_helper
from test_package_apk import TestPackageApk
from test_package_executable import TestPackageExecutable
@@ -59,6 +60,9 @@ class SingleTestRunner(BaseTestRunner):
self.adb, device,
test_suite, timeout, rebaseline, performance_test, cleanup_test_files,
self.tool, self.dump_debug_info)
+ self._performance_test_setup = None
+ if performance_test:
+ self._performance_test_setup = perf_tests_helper.PerfTestSetup(self.adb)
def _TestSuiteRequiresMockTestServer(self):
"""Returns True if the test suite requires mock test server."""
@@ -256,7 +260,7 @@ class SingleTestRunner(BaseTestRunner):
# Make sure SD card is ready.
self.adb.WaitForSdCardReady(20)
for data in test_data:
- self.CopyTestData([data], constants.TEST_DATA_DIR)
+ self.CopyTestData([data], self.adb.GetExternalStorage())
def RunTestsWithFilter(self):
"""Runs a tests via a small, temporary shell script."""
@@ -317,8 +321,8 @@ class SingleTestRunner(BaseTestRunner):
"""Sets up necessary test enviroment for the test suite."""
super(SingleTestRunner, self).SetUp()
self.adb.ClearApplicationState(constants.CHROME_PACKAGE)
- if self.test_package.performance_test:
- self.adb.SetupPerformanceTest()
+ if self._performance_test_setup:
+ self._performance_test_setup.SetUp()
if self.dump_debug_info:
self.dump_debug_info.StartRecordingLog(True)
self.StripAndCopyFiles()
@@ -332,8 +336,8 @@ class SingleTestRunner(BaseTestRunner):
self.adb.RemovePushedFiles()
if self.dump_debug_info:
self.dump_debug_info.StopRecordingLog()
- if self.test_package.performance_test:
- self.adb.TearDownPerformanceTest()
+ if self._performance_test_setup:
+ self._performance_test_setup.TearDown()
if self.dump_debug_info:
self.dump_debug_info.ArchiveNewCrashFiles()
super(SingleTestRunner, self).TearDown()
« no previous file with comments | « build/android/pylib/run_java_tests.py ('k') | build/android/pylib/test_package.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698