Index: build/android/buildbot/bb_device_steps.py |
diff --git a/build/android/buildbot/bb_device_steps.py b/build/android/buildbot/bb_device_steps.py |
index 41256f9858b146637a221e525e914f796da262c5..e0b82d61112a11f9801146ad3b23d0b09ffeda08 100755 |
--- a/build/android/buildbot/bb_device_steps.py |
+++ b/build/android/buildbot/bb_device_steps.py |
@@ -322,13 +322,19 @@ def _ParseLayoutTestResults(results): |
passes = {} |
for (test, result) in tests.iteritems(): |
if result.get('is_unexpected'): |
- actual_result = result['actual'] |
- if ' PASS' in actual_result: |
- flakes[test] = actual_result |
- elif actual_result == 'PASS': |
+ actual_results = result['actual'].split() |
+ expected_results = result['expected'].split() |
+ if len(actual_results) > 1: |
+ # We report the first failure type back, even if the second |
+ # was more severe. |
+ if actual_results[1] in expected_results: |
+ flakes[test] = actual_results[0] |
+ else: |
+ failures[test] = actual_results[0] |
+ elif actual_results[0] == 'PASS': |
passes[test] = result |
else: |
- failures[test] = actual_result |
+ failures[test] = actual_results[0] |
return (passes, failures, flakes) |