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

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

Issue 10824067: Some fixes to run unit_tests bundle on android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | chrome/browser/download/download_util.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 logging 6 import logging
7 import re 7 import re
8 import os 8 import os
9 import pexpect 9 import pexpect
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 current = test 99 current = test
100 continue 100 continue
101 if 'YOU HAVE' in test: 101 if 'YOU HAVE' in test:
102 break 102 break
103 test_name = test[2:] 103 test_name = test[2:]
104 if not any([test_name.startswith(x) for x in disabled_prefixes]): 104 if not any([test_name.startswith(x) for x in disabled_prefixes]):
105 ret += [current + test_name] 105 ret += [current + test_name]
106 return ret 106 return ret
107 107
108 def PushDataAndPakFiles(self): 108 def PushDataAndPakFiles(self):
109 if self.test_suite_basename == 'ui_unittests': 109 if (self.test_suite_basename == 'ui_unittests' or
110 self.adb.PushIfNeeded(self.test_suite_dirname + '/chrome.pak', 110 self.test_suite_basename == 'unit_tests'):
111 '/data/local/tmp/paks/chrome.pak') 111 self.adb.PushIfNeeded(
112 self.adb.PushIfNeeded(self.test_suite_dirname + '/locales/en-US.pak', 112 self.test_suite_dirname + '/chrome.pak',
113 '/data/local/tmp/paks/en-US.pak') 113 '/data/local/tmp/paks/chrome.pak')
114 self.adb.PushIfNeeded(
115 self.test_suite_dirname + '/locales/en-US.pak',
116 '/data/local/tmp/paks/en-US.pak')
117 if self.test_suite_basename == 'unit_tests':
118 self.adb.PushIfNeeded(
119 self.test_suite_dirname + '/resources.pak',
120 '/data/local/tmp/paks/resources.pak')
121 self.adb.PushIfNeeded(
122 self.test_suite_dirname + '/theme_resources_100_percent.pak',
123 '/data/local/tmp/paks/theme_resources_100_percent.pak')
124 self.adb.PushIfNeeded(
125 self.test_suite_dirname + '/ui_resources_100_percent.pak',
126 '/data/local/tmp/paks/ui_resources_100_percent.pak')
127 self.adb.PushIfNeeded(self.test_suite_dirname + '/test_data',
128 '/data/local/tmp/test_data')
129 if self.test_suite_basename == 'content_unittests':
130 self.adb.PushIfNeeded(
131 self.test_suite_dirname + '/content_resources.pak',
132 '/data/local/tmp/paks/content_resources.pak')
114 133
115 def _WatchTestOutput(self, p): 134 def _WatchTestOutput(self, p):
116 """Watches the test output. 135 """Watches the test output.
117 Args: 136 Args:
118 p: the process generating output as created by pexpect.spawn. 137 p: the process generating output as created by pexpect.spawn.
119 """ 138 """
120 ok_tests = [] 139 ok_tests = []
121 failed_tests = [] 140 failed_tests = []
122 crashed_tests = [] 141 crashed_tests = []
123 timed_out = False 142 timed_out = False
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 if ret_code: 193 if ret_code:
175 failed_tests += [BaseTestResult('gtest exit code: %d' % ret_code, 194 failed_tests += [BaseTestResult('gtest exit code: %d' % ret_code,
176 'pexpect.before: %s' 195 'pexpect.before: %s'
177 '\npexpect.after: %s' 196 '\npexpect.after: %s'
178 % (p.before, 197 % (p.before,
179 p.after))] 198 p.after))]
180 # Create TestResults and return 199 # Create TestResults and return
181 return TestResults.FromRun(ok=ok_tests, failed=failed_tests, 200 return TestResults.FromRun(ok=ok_tests, failed=failed_tests,
182 crashed=crashed_tests, timed_out=timed_out, 201 crashed=crashed_tests, timed_out=timed_out,
183 overall_fail=overall_fail) 202 overall_fail=overall_fail)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/download_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698