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

Side by Side Diff: build/android/pylib/test_package_apk.py

Issue 10896050: Android: Use external storage for test data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/android/pylib/single_test_runner.py ('k') | net/test/remote_test_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5
6 import os 6 import os
7 import re 7 import re
8 import sys 8 import sys
9 9
10 import cmd_helper 10 import cmd_helper
(...skipping 30 matching lines...) Expand all
41 TestPackage.__init__(self, adb, device, test_suite, timeout, 41 TestPackage.__init__(self, adb, device, test_suite, timeout,
42 rebaseline, performance_test, cleanup_test_files, 42 rebaseline, performance_test, cleanup_test_files,
43 tool, dump_debug_info) 43 tool, dump_debug_info)
44 44
45 def _CreateTestRunnerScript(self, options): 45 def _CreateTestRunnerScript(self, options):
46 command_line_file = tempfile.NamedTemporaryFile() 46 command_line_file = tempfile.NamedTemporaryFile()
47 # GTest expects argv[0] to be the executable path. 47 # GTest expects argv[0] to be the executable path.
48 command_line_file.write(self.test_suite_basename + ' ' + options) 48 command_line_file.write(self.test_suite_basename + ' ' + options)
49 command_line_file.flush() 49 command_line_file.flush()
50 self.adb.PushIfNeeded(command_line_file.name, 50 self.adb.PushIfNeeded(command_line_file.name,
51 constants.TEST_DATA_DIR + 51 constants.TEST_EXECUTABLE_DIR +
52 '/chrome-native-tests-command-line') 52 '/chrome-native-tests-command-line')
53 53
54 def _GetGTestReturnCode(self): 54 def _GetGTestReturnCode(self):
55 return None 55 return None
56 56
57 def GetAllTests(self): 57 def GetAllTests(self):
58 """Returns a list of all tests available in the test suite.""" 58 """Returns a list of all tests available in the test suite."""
59 self._CreateTestRunnerScript('--gtest_list_tests') 59 self._CreateTestRunnerScript('--gtest_list_tests')
60 try: 60 try:
61 self.tool.SetupEnvironment() 61 self.tool.SetupEnvironment()
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 def StripAndCopyExecutable(self): 98 def StripAndCopyExecutable(self):
99 # Always uninstall the previous one (by activity name); we don't 99 # Always uninstall the previous one (by activity name); we don't
100 # know what was embedded in it. 100 # know what was embedded in it.
101 self.adb.ManagedInstall(self.test_suite_full, False, 101 self.adb.ManagedInstall(self.test_suite_full, False,
102 package_name='org.chromium.native_test') 102 package_name='org.chromium.native_test')
103 103
104 def _GetTestSuiteBaseName(self): 104 def _GetTestSuiteBaseName(self):
105 """Returns the base name of the test suite.""" 105 """Returns the base name of the test suite."""
106 # APK test suite names end with '-debug.apk' 106 # APK test suite names end with '-debug.apk'
107 return os.path.basename(self.test_suite).rsplit('-debug', 1)[0] 107 return os.path.basename(self.test_suite).rsplit('-debug', 1)[0]
OLDNEW
« no previous file with comments | « build/android/pylib/single_test_runner.py ('k') | net/test/remote_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698