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

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

Issue 10310046: Detect crashes while running native tests in APK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments and rebase Created 8 years, 7 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/test_package.py ('k') | testing/android/native_test_launcher.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 7
8 8
9 # Language values match constants in Sponge protocol buffer (sponge.proto). 9 # Language values match constants in Sponge protocol buffer (sponge.proto).
10 JAVA = 5 10 JAVA = 5
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 self.ok = [] 54 self.ok = []
55 self.failed = [] 55 self.failed = []
56 self.crashed = [] 56 self.crashed = []
57 self.unknown = [] 57 self.unknown = []
58 self.disabled = [] 58 self.disabled = []
59 self.unexpected_pass = [] 59 self.unexpected_pass = []
60 self.timed_out = False 60 self.timed_out = False
61 self.overall_fail = False 61 self.overall_fail = False
62 62
63 @staticmethod 63 @staticmethod
64 def FromOkAndFailed(ok, failed, timed_out, overall_fail): 64 def FromRun(ok=None, failed=None, crashed=None, timed_out=False,
65 overall_fail=False):
65 ret = TestResults() 66 ret = TestResults()
66 ret.ok = ok 67 ret.ok = ok or []
67 ret.failed = failed 68 ret.failed = failed or []
69 ret.crashed = crashed or []
68 ret.timed_out = timed_out 70 ret.timed_out = timed_out
69 ret.overall_fail = overall_fail 71 ret.overall_fail = overall_fail
70 return ret 72 return ret
71 73
72 @staticmethod 74 @staticmethod
73 def FromTestResults(results): 75 def FromTestResults(results):
74 """Combines a list of results in a single TestResults object.""" 76 """Combines a list of results in a single TestResults object."""
75 ret = TestResults() 77 ret = TestResults()
76 for t in results: 78 for t in results:
77 ret.ok += t.ok 79 ret.ok += t.ok
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 len(self.crashed) + len(self.unknown)) 121 len(self.crashed) + len(self.unknown))
120 summary_string += 'PASSED=%d\n' % (len(self.ok)) 122 summary_string += 'PASSED=%d\n' % (len(self.ok))
121 summary_string += 'FAILED=%d %s\n' % (len(self.failed), 123 summary_string += 'FAILED=%d %s\n' % (len(self.failed),
122 [t.name for t in self.failed]) 124 [t.name for t in self.failed])
123 summary_string += 'CRASHED=%d %s\n' % (len(self.crashed), 125 summary_string += 'CRASHED=%d %s\n' % (len(self.crashed),
124 [t.name for t in self.crashed]) 126 [t.name for t in self.crashed])
125 summary_string += 'UNKNOWN=%d %s\n' % (len(self.unknown), 127 summary_string += 'UNKNOWN=%d %s\n' % (len(self.unknown),
126 [t.name for t in self.unknown]) 128 [t.name for t in self.unknown])
127 logging.critical(summary_string) 129 logging.critical(summary_string)
128 return summary_string 130 return summary_string
OLDNEW
« no previous file with comments | « build/android/test_package.py ('k') | testing/android/native_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698