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

Side by Side Diff: scripts/master/log_parser/gtest_command.py

Issue 10556042: Update GTest Parsing Code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 8 years, 6 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 | « scripts/common/unittests/gtest_utils_test.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 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """A buildbot command for running and interpreting GTest tests.""" 6 """A buildbot command for running and interpreting GTest tests."""
7 7
8 import fileinput 8 import fileinput
9 import re 9 import re
10 import sys 10 import sys
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 def FailedTests(self, include_fails=False, include_flaky=False): 46 def FailedTests(self, include_fails=False, include_flaky=False):
47 """Returns list of tests that failed, timed out, or didn't finish 47 """Returns list of tests that failed, timed out, or didn't finish
48 (crashed). 48 (crashed).
49 49
50 This list will be incorrect until the complete log has been processed, 50 This list will be incorrect until the complete log has been processed,
51 because it will show currently running tests as having failed. 51 because it will show currently running tests as having failed.
52 52
53 Args: 53 Args:
54 include_fails: If true, all failing tests with FAILS_ in their names will 54 include_fails: If true, all failing tests with FAILS_ in their names will
55 be included. Otherwise, they will only be included if they crashed. 55 be included. Otherwise, they will only be included if they crashed or
56 timed out.
56 include_flaky: If true, all failing tests with FLAKY_ in their names will 57 include_flaky: If true, all failing tests with FLAKY_ in their names will
57 be included. Otherwise, they will only be included if they crashed. 58 be included. Otherwise, they will only be included if they crashed or
59 timed out.
58 60
59 """ 61 """
60 return self.gtest_parser.FailedTests(include_fails=include_fails, 62 return self.gtest_parser.FailedTests(include_fails=include_fails,
61 include_flaky=include_flaky) 63 include_flaky=include_flaky)
62 64
63 def DisabledTests(self): 65 def DisabledTests(self):
64 """Returns the name of the disabled test (if there is only 1) or the number 66 """Returns the name of the disabled test (if there is only 1) or the number
65 of disabled tests. 67 of disabled tests.
66 """ 68 """
67 return self.gtest_parser.DisabledTests() 69 return self.gtest_parser.DisabledTests()
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 print 'Failed tests:\n' 210 print 'Failed tests:\n'
209 for failed_test in observer.FailedTests(True, True): 211 for failed_test in observer.FailedTests(True, True):
210 for fail_line in observer.FailureDescription(failed_test): 212 for fail_line in observer.FailureDescription(failed_test):
211 print fail_line.strip() 213 print fail_line.strip()
212 print '' 214 print ''
213 return 0 215 return 0
214 216
215 217
216 if '__main__' == __name__: 218 if '__main__' == __name__:
217 sys.exit(Main()) 219 sys.exit(Main())
OLDNEW
« no previous file with comments | « scripts/common/unittests/gtest_utils_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698