OLD | NEW |
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 """Helper functions for the layout test analyzer.""" | 5 """Helper functions for the layout test analyzer.""" |
6 | 6 |
7 from datetime import datetime | 7 from datetime import datetime |
8 from email.mime.multipart import MIMEMultipart | 8 from email.mime.multipart import MIMEMultipart |
9 from email.mime.text import MIMEText | 9 from email.mime.text import MIMEText |
10 import fileinput | 10 import fileinput |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 refer to |test_expectaions.ALL_TE_KEYWORDS|). | 56 refer to |test_expectaions.ALL_TE_KEYWORDS|). |
57 """ | 57 """ |
58 self.result_map = {} | 58 self.result_map = {} |
59 self.result_map['whole'] = {} | 59 self.result_map['whole'] = {} |
60 self.result_map['skip'] = {} | 60 self.result_map['skip'] = {} |
61 self.result_map['nonskip'] = {} | 61 self.result_map['nonskip'] = {} |
62 if test_info_map: | 62 if test_info_map: |
63 for (k, value) in test_info_map.iteritems(): | 63 for (k, value) in test_info_map.iteritems(): |
64 self.result_map['whole'][k] = value | 64 self.result_map['whole'][k] = value |
65 if 'te_info' in value: | 65 if 'te_info' in value: |
| 66 # Don't count SLOW PASS tests as failures. |
| 67 if any([True for x in value['te_info'] if set(x.keys()) == |
| 68 set(['SLOW', 'PASS', 'Bugs', 'Comments'])]): |
| 69 continue |
66 if any([True for x in value['te_info'] if 'SKIP' in x]): | 70 if any([True for x in value['te_info'] if 'SKIP' in x]): |
67 self.result_map['skip'][k] = value | 71 self.result_map['skip'][k] = value |
68 else: | 72 else: |
69 self.result_map['nonskip'][k] = value | 73 self.result_map['nonskip'][k] = value |
70 | 74 |
71 @staticmethod | 75 @staticmethod |
72 def GetDiffString(diff_map_element, type_str): | 76 def GetDiffString(diff_map_element, type_str): |
73 """Get difference string out of diff map element. | 77 """Get difference string out of diff map element. |
74 | 78 |
75 The difference string shows difference between two analyzer results | 79 The difference string shows difference between two analyzer results |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 list2 = map2[name]['te_info'] | 594 list2 = map2[name]['te_info'] |
591 te_diff = [item for item in list1 if not item in list2] | 595 te_diff = [item for item in list1 if not item in list2] |
592 if te_diff: | 596 if te_diff: |
593 name_list.append((name, te_diff)) | 597 name_list.append((name, te_diff)) |
594 else: | 598 else: |
595 name_list.append((name, value1)) | 599 name_list.append((name, value1)) |
596 return name_list | 600 return name_list |
597 | 601 |
598 return (GetDiffBetweenMapsHelper(map1, map2, lookIntoTestExpectationInfo), | 602 return (GetDiffBetweenMapsHelper(map1, map2, lookIntoTestExpectationInfo), |
599 GetDiffBetweenMapsHelper(map2, map1, lookIntoTestExpectationInfo)) | 603 GetDiffBetweenMapsHelper(map2, map1, lookIntoTestExpectationInfo)) |
OLD | NEW |