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

Side by Side Diff: build/android/run_tests.py

Issue 12049046: Revert 178345 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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/utils/flakiness_dashboard_results_uploader.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Runs all the native unit tests. 7 """Runs all the native unit tests.
8 8
9 1. Copy over test binary to /data/local on device. 9 1. Copy over test binary to /data/local on device.
10 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak) 10 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak)
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 not not self.log_dump_name, 189 not not self.log_dump_name,
190 self.build_type, 190 self.build_type,
191 self.in_webkit_checkout) 191 self.in_webkit_checkout)
192 192
193 def OnTestsCompleted(self, test_runners, test_results): 193 def OnTestsCompleted(self, test_runners, test_results):
194 """Notifies that we completed the tests.""" 194 """Notifies that we completed the tests."""
195 test_results.LogFull( 195 test_results.LogFull(
196 test_type='Unit test', 196 test_type='Unit test',
197 test_package=test_runners[0].test_package.test_suite_basename, 197 test_package=test_runners[0].test_package.test_suite_basename,
198 build_type=self.build_type, 198 build_type=self.build_type,
199 all_tests=self.all_tests,
199 flakiness_server=self.flakiness_server) 200 flakiness_server=self.flakiness_server)
200 test_results.PrintAnnotation() 201 test_results.PrintAnnotation()
201 202
202 if self.log_dump_name: 203 if self.log_dump_name:
203 # Zip all debug info outputs into a file named by log_dump_name. 204 # Zip all debug info outputs into a file named by log_dump_name.
204 debug_info.GTestDebugInfo.ZipAndCleanResults( 205 debug_info.GTestDebugInfo.ZipAndCleanResults(
205 os.path.join( 206 os.path.join(
206 cmd_helper.OutDirectory.get(), self.build_type, 207 cmd_helper.OutDirectory.get(), self.build_type,
207 'debug_info_dumps'), 208 'debug_info_dumps'),
208 self.log_dump_name) 209 self.log_dump_name)
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 options.tool, 258 options.tool,
258 options.log_dump, 259 options.log_dump,
259 options.build_type, 260 options.build_type,
260 options.webkit, 261 options.webkit,
261 options.flakiness_dashboard_server) 262 options.flakiness_dashboard_server)
262 test_results = sharder.RunShardedTests() 263 test_results = sharder.RunShardedTests()
263 264
264 for buildbot_emulator in buildbot_emulators: 265 for buildbot_emulator in buildbot_emulators:
265 buildbot_emulator.Shutdown() 266 buildbot_emulator.Shutdown()
266 267
267 return len(test_results.GetAllBroken()) 268 return len(test_results.failed)
268 269
269 270
270 def Dispatch(options): 271 def Dispatch(options):
271 """Dispatches the tests, sharding if possible. 272 """Dispatches the tests, sharding if possible.
272 273
273 If options.use_emulator is True, all tests will be run in new emulator 274 If options.use_emulator is True, all tests will be run in new emulator
274 instance. 275 instance.
275 276
276 Args: 277 Args:
277 options: options for running the tests. 278 options: options for running the tests.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 # the batch (this happens because the exit status is a sum of all failures 334 # the batch (this happens because the exit status is a sum of all failures
334 # from all suites, but the buildbot associates the exit status only with the 335 # from all suites, but the buildbot associates the exit status only with the
335 # most recent step). 336 # most recent step).
336 if options.exit_code: 337 if options.exit_code:
337 return failed_tests_count 338 return failed_tests_count
338 return 0 339 return 0
339 340
340 341
341 if __name__ == '__main__': 342 if __name__ == '__main__':
342 sys.exit(main(sys.argv)) 343 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « build/android/pylib/utils/flakiness_dashboard_results_uploader.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698