| 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 |
| 11 import os | 11 import os |
| 12 import pickle | 12 import pickle |
| 13 import re | 13 import re |
| 14 import smtplib | 14 import smtplib |
| 15 import socket | 15 import socket |
| 16 import sys | 16 import sys |
| 17 import time | 17 import time |
| 18 | 18 |
| 19 from bug import Bug | 19 from bug import Bug |
| 20 from test_expectations_history import TestExpectationsHistory | 20 from test_expectations_history import TestExpectationsHistory |
| 21 | 21 |
| 22 DEFAULT_TEST_EXPECTATION_PATH = ('trunk/LayoutTests/TestExpectations') | 22 DEFAULT_TEST_EXPECTATION_PATH = ('trunk/LayoutTests/TestExpectations') |
| 23 LEGACY_DEFAULT_TEST_EXPECTATION_PATH = ( | 23 LEGACY_DEFAULT_TEST_EXPECTATION_PATH = ( |
| 24 'trunk/LayoutTests/platform/chromium/test_expectations.txt') | 24 'trunk/LayoutTests/platform/chromium/test_expectations.txt') |
| 25 REVISION_LOG_URL = ('http://build.chromium.org/f/chromium/perf/dashboard/ui/' | 25 REVISION_LOG_URL = ('http://build.chromium.org/f/chromium/perf/dashboard/ui/' |
| 26 'changelog_blink.html?url=/trunk/LayoutTests/%s&range=%d:%d') | 26 'changelog_blink.html?url=/trunk/LayoutTests/%s&range=%d:%d') |
| 27 DEFAULT_REVISION_VIEW_URL = 'http://src.chromium.org/viewvc/blink?revision=%s' | |
| 28 | 27 |
| 29 | 28 |
| 30 class AnalyzerResultMap: | 29 class AnalyzerResultMap: |
| 31 """A class to deal with joined result produed by the analyzer. | 30 """A class to deal with joined result produed by the analyzer. |
| 32 | 31 |
| 33 The join is done between layouttests and the test_expectations object | 32 The join is done between layouttests and the test_expectations object |
| 34 (based on the test expectation file). The instance variable |result_map| | 33 (based on the test expectation file). The instance variable |result_map| |
| 35 contains the following keys: 'whole','skip','nonskip'. The value of 'whole' | 34 contains the following keys: 'whole','skip','nonskip'. The value of 'whole' |
| 36 contains information about all layouttests. The value of 'skip' contains | 35 contains information about all layouttests. The value of 'skip' contains |
| 37 information about skipped layouttests where it has 'SKIP' in its entry in | 36 information about skipped layouttests where it has 'SKIP' in its entry in |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 list2 = map2[name]['te_info'] | 586 list2 = map2[name]['te_info'] |
| 588 te_diff = [item for item in list1 if not item in list2] | 587 te_diff = [item for item in list1 if not item in list2] |
| 589 if te_diff: | 588 if te_diff: |
| 590 name_list.append((name, te_diff)) | 589 name_list.append((name, te_diff)) |
| 591 else: | 590 else: |
| 592 name_list.append((name, value1)) | 591 name_list.append((name, value1)) |
| 593 return name_list | 592 return name_list |
| 594 | 593 |
| 595 return (GetDiffBetweenMapsHelper(map1, map2, lookIntoTestExpectationInfo), | 594 return (GetDiffBetweenMapsHelper(map1, map2, lookIntoTestExpectationInfo), |
| 596 GetDiffBetweenMapsHelper(map2, map1, lookIntoTestExpectationInfo)) | 595 GetDiffBetweenMapsHelper(map2, map1, lookIntoTestExpectationInfo)) |
| OLD | NEW |