| Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py
|
| index 8de8003ec4a3f15a71f5a983b21fc29a64398dd4..09dfda8661a549034f655e8a3b9e01ef46a5d15d 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py
|
| @@ -31,7 +31,6 @@ import logging
|
|
|
|
|
| class ProcessJsonData(object):
|
| -
|
| def __init__(self, current_result_json_dict, old_failing_results_list, old_full_results_list):
|
| self._current_result_json_dict = current_result_json_dict
|
| self._old_failing_results_list = old_failing_results_list
|
| @@ -87,7 +86,6 @@ class ProcessJsonData(object):
|
|
|
|
|
| class DashBoardGenerator(object):
|
| -
|
| def __init__(self, port):
|
| self._port = port
|
| self._filesystem = port.host.filesystem
|
| @@ -105,7 +103,8 @@ class DashBoardGenerator(object):
|
|
|
| def _copy_dashboard_html(self):
|
| dashboard_file = self._filesystem.join(self._results_directory, 'dashboard.html')
|
| - dashboard_html_file_path = self._filesystem.join(self._port.layout_tests_dir(), 'fast/harness/archived-results-dashboard.html')
|
| + dashboard_html_file_path = self._filesystem.join(self._port.layout_tests_dir(),
|
| + 'fast/harness/archived-results-dashboard.html')
|
| if not self._filesystem.exists(dashboard_file):
|
| if self._filesystem.exists(dashboard_html_file_path):
|
| self._filesystem.copyfile(dashboard_html_file_path, dashboard_file)
|
| @@ -121,7 +120,7 @@ class DashBoardGenerator(object):
|
| results_directories.sort(reverse=True, key=lambda x: self._filesystem.mtime(x))
|
| current_failing_results_json_file = self._filesystem.join(results_directories[0], 'failing_results.json')
|
| input_json_string = self._filesystem.read_text_file(current_failing_results_json_file)
|
| - input_json_string = input_json_string[12:-2] # Remove preceding string ADD_RESULTS( and ); at the end
|
| + input_json_string = input_json_string[12:-2] # Remove preceding string ADD_RESULTS( and ); at the end
|
| self._current_result_json_dict['tests'] = json.loads(input_json_string)['tests']
|
| results_directories = results_directories[1:]
|
|
|
| @@ -133,7 +132,7 @@ class DashBoardGenerator(object):
|
| failing_json_file_path = self._filesystem.join(json_file, 'failing_results.json')
|
| full_json_file_path = self._filesystem.join(json_file, 'full_results.json')
|
| json_string = self._filesystem.read_text_file(failing_json_file_path)
|
| - json_string = json_string[12:-2] # Remove preceding string ADD_RESULTS( and ); at the end
|
| + json_string = json_string[12:-2] # Remove preceding string ADD_RESULTS( and ); at the end
|
| self._old_failing_results_list.append(json.loads(json_string))
|
| json_string_full_result = self._filesystem.read_text_file(full_json_file_path)
|
| self._old_full_results_list.append(json.loads(json_string_full_result))
|
| @@ -144,7 +143,8 @@ class DashBoardGenerator(object):
|
|
|
| # There must be at least one archived result to be processed
|
| if self._current_result_json_dict:
|
| - process_json_data = ProcessJsonData(self._current_result_json_dict, self._old_failing_results_list, self._old_full_results_list)
|
| + process_json_data = ProcessJsonData(self._current_result_json_dict, self._old_failing_results_list,
|
| + self._old_full_results_list)
|
| self._final_result = process_json_data.generate_archived_result()
|
| final_json = json.dumps(self._final_result)
|
| final_json = 'ADD_RESULTS(' + final_json + ');'
|
|
|