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

Unified Diff: Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py

Issue 576003002: Full JSON file has to be read instead of first line. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py b/Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py
index d47c48fe870a42ea35659ecc02849ec24862cb12..5c8a2b2987dafc8e4597827f5f77ebbfe814e1b8 100644
--- a/Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py
+++ b/Tools/Scripts/webkitpy/layout_tests/generate_results_dashboard.py
@@ -120,8 +120,7 @@ class GenerateDashBoard(object):
results_directories.append(full_dir_path)
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')
- with self._filesystem.open_text_file_for_reading(current_failing_results_json_file) as file:
- input_json_string = file.readline()
+ input_json_string = self._filesystem.read_text_file(current_failing_results_json_file)
input_json_string = input_json_string[12:-2] # Remove preceeding 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,13 +132,10 @@ class GenerateDashBoard(object):
for json_file in results_directories:
failing_json_file_path = self._filesystem.join(json_file, 'failing_results.json')
full_json_file_path = self._filesystem.join(json_file, 'full_results.json')
- with self._filesystem.open_text_file_for_reading(failing_json_file_path) as file:
- json_string = file.readline()
+ json_string = self._filesystem.read_text_file(failing_json_file_path)
json_string = json_string[12:-2] # Remove preceeding string ADD_RESULTS( and ); at the end
self._old_failing_results_list.append(json.loads(json_string))
-
- with self._filesystem.open_text_file_for_reading(full_json_file_path) as full_file:
- json_string_full_result = full_file.readline()
+ 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))
self._copy_dashboard_html()
« 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