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

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

Issue 11557004: Fix the corner case issue with Android test sharder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
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 9
10 import constants 10 import constants
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 initial_io_stats[stat]], 84 initial_io_stats[stat]],
85 stat.split('_')[1], 85 stat.split('_')[1],
86 print_to_stdout=False) 86 print_to_stdout=False)
87 logging.info(disk_io) 87 logging.info(disk_io)
88 return disk_io 88 return disk_io
89 89
90 def GetDisabledPrefixes(self): 90 def GetDisabledPrefixes(self):
91 return ['DISABLED_', 'FLAKY_', 'FAILS_'] 91 return ['DISABLED_', 'FLAKY_', 'FAILS_']
92 92
93 def _ParseGTestListTests(self, all_tests): 93 def _ParseGTestListTests(self, all_tests):
94 """Parses and filters the raw test lists.
95
96 Args:
97 all_tests: The raw test listing with the following format:
98
99 IPCChannelTest.
100 SendMessageInChannelConnected
101 IPCSyncChannelTest.
102 Simple
103 DISABLED_SendWithTimeoutMixedOKAndTimeout
104
105 Returns:
106 A list of non-disabled tests. For the above raw listing:
107
108 [IPCChannelTest.SendMessageInChannelConnected, IPCSyncChannelTest.Simple]
109 """
94 ret = [] 110 ret = []
95 current = '' 111 current = ''
96 disabled_prefixes = self.GetDisabledPrefixes() 112 disabled_prefixes = self.GetDisabledPrefixes()
97 for test in all_tests: 113 for test in all_tests:
98 if not test: 114 if not test:
99 continue 115 continue
100 if test[0] != ' ' and not test.endswith('.'): 116 if test[0] != ' ' and not test.endswith('.'):
101 # Ignore any lines with unexpected format. 117 # Ignore any lines with unexpected format.
102 continue 118 continue
103 if test[0] != ' ' and test.endswith('.'): 119 if test[0] != ' ' and test.endswith('.'):
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 if ret_code: 209 if ret_code:
194 failed_tests += [BaseTestResult('gtest exit code: %d' % ret_code, 210 failed_tests += [BaseTestResult('gtest exit code: %d' % ret_code,
195 'pexpect.before: %s' 211 'pexpect.before: %s'
196 '\npexpect.after: %s' 212 '\npexpect.after: %s'
197 % (p.before, 213 % (p.before,
198 p.after))] 214 p.after))]
199 # Create TestResults and return 215 # Create TestResults and return
200 return TestResults.FromRun(ok=ok_tests, failed=failed_tests, 216 return TestResults.FromRun(ok=ok_tests, failed=failed_tests,
201 crashed=crashed_tests, timed_out=timed_out, 217 crashed=crashed_tests, timed_out=timed_out,
202 overall_fail=overall_fail) 218 overall_fail=overall_fail)
OLDNEW
« build/android/pylib/single_test_runner.py ('K') | « build/android/pylib/single_test_runner.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698