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

Side by Side Diff: build/android/buildbot/bb_device_steps.py

Issue 26110008: Fix handling of tests that fail two different ways in run-webkit-tests (buildbot side) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rietveld!! Created 7 years, 2 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 | 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) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 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 import collections 6 import collections
7 import glob 7 import glob
8 import hashlib 8 import hashlib
9 import json 9 import json
10 import multiprocessing 10 import multiprocessing
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 315
316 def _ParseLayoutTestResults(results): 316 def _ParseLayoutTestResults(results):
317 """Extract the failures from the test run.""" 317 """Extract the failures from the test run."""
318 # Cloned from third_party/WebKit/Tools/Scripts/print-json-test-results 318 # Cloned from third_party/WebKit/Tools/Scripts/print-json-test-results
319 tests = _ConvertTrieToFlatPaths(results['tests']) 319 tests = _ConvertTrieToFlatPaths(results['tests'])
320 failures = {} 320 failures = {}
321 flakes = {} 321 flakes = {}
322 passes = {} 322 passes = {}
323 for (test, result) in tests.iteritems(): 323 for (test, result) in tests.iteritems():
324 if result.get('is_unexpected'): 324 if result.get('is_unexpected'):
325 actual_result = result['actual'] 325 actual_results = result['actual'].split()
326 if ' PASS' in actual_result: 326 expected_results = result['expected'].split()
327 flakes[test] = actual_result 327 if len(actual_results) > 1:
328 elif actual_result == 'PASS': 328 # We report the first failure type back, even if the second
329 # was more severe.
330 if actual_results[1] in expected_results:
331 flakes[test] = actual_results[0]
332 else:
333 failures[test] = actual_results[0]
334 elif actual_results[0] == 'PASS':
329 passes[test] = result 335 passes[test] = result
330 else: 336 else:
331 failures[test] = actual_result 337 failures[test] = actual_results[0]
332 338
333 return (passes, failures, flakes) 339 return (passes, failures, flakes)
334 340
335 341
336 def _ConvertTrieToFlatPaths(trie, prefix=None): 342 def _ConvertTrieToFlatPaths(trie, prefix=None):
337 """Flatten the trie of failures into a list.""" 343 """Flatten the trie of failures into a list."""
338 # Cloned from third_party/WebKit/Tools/Scripts/print-json-test-results 344 # Cloned from third_party/WebKit/Tools/Scripts/print-json-test-results
339 result = {} 345 result = {}
340 for name, data in trie.iteritems(): 346 for name, data in trie.iteritems():
341 if prefix: 347 if prefix:
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) 594 setattr(options, 'target', options.factory_properties.get('target', 'Debug'))
589 if options.coverage_bucket: 595 if options.coverage_bucket:
590 setattr(options, 'coverage_dir', 596 setattr(options, 'coverage_dir',
591 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) 597 os.path.join(CHROME_OUT_DIR, options.target, 'coverage'))
592 598
593 MainTestWrapper(options) 599 MainTestWrapper(options)
594 600
595 601
596 if __name__ == '__main__': 602 if __name__ == '__main__':
597 sys.exit(main(sys.argv)) 603 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698