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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py

Issue 2813173002: webkitpy: Rework the JSON output flags. (Closed)
Patch Set: Fixing for review. Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 exit_code = summarized_failing_results['num_regressions'] 207 exit_code = summarized_failing_results['num_regressions']
208 if exit_code > exit_codes.MAX_FAILURES_EXIT_STATUS: 208 if exit_code > exit_codes.MAX_FAILURES_EXIT_STATUS:
209 _log.warning('num regressions (%d) exceeds max exit status (%d)', 209 _log.warning('num regressions (%d) exceeds max exit status (%d)',
210 exit_code, exit_codes.MAX_FAILURES_EXIT_STATUS) 210 exit_code, exit_codes.MAX_FAILURES_EXIT_STATUS)
211 exit_code = exit_codes.MAX_FAILURES_EXIT_STATUS 211 exit_code = exit_codes.MAX_FAILURES_EXIT_STATUS
212 212
213 if not self._options.dry_run: 213 if not self._options.dry_run:
214 self._write_json_files(summarized_full_results, summarized_failing_r esults, initial_results, running_all_tests) 214 self._write_json_files(summarized_full_results, summarized_failing_r esults, initial_results, running_all_tests)
215 215
216 if self._options.write_full_results_to:
217 self._filesystem.copyfile(self._filesystem.join(self._results_di rectory, "full_results.json"),
218 self._options.write_full_results_to)
219
220 self._upload_json_files() 216 self._upload_json_files()
221 217
222 results_path = self._filesystem.join(self._results_directory, "resul ts.html") 218 results_path = self._filesystem.join(self._results_directory, "resul ts.html")
223 self._copy_results_html_file(results_path) 219 self._copy_results_html_file(results_path)
224 if initial_results.keyboard_interrupted: 220 if initial_results.keyboard_interrupted:
225 exit_code = exit_codes.INTERRUPTED_EXIT_STATUS 221 exit_code = exit_codes.INTERRUPTED_EXIT_STATUS
226 else: 222 else:
227 if initial_results.interrupted: 223 if initial_results.interrupted:
228 exit_code = exit_codes.EARLY_EXIT_STATUS 224 exit_code = exit_codes.EARLY_EXIT_STATUS
229 if self._options.show_results and ( 225 if self._options.show_results and (
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 self._filesystem.write_text_file(stats_path, json.dumps(stats_trie)) 484 self._filesystem.write_text_file(stats_path, json.dumps(stats_trie))
489 485
490 full_results_path = self._filesystem.join(self._results_directory, "full _results.json") 486 full_results_path = self._filesystem.join(self._results_directory, "full _results.json")
491 json_results_generator.write_json(self._filesystem, summarized_full_resu lts, full_results_path) 487 json_results_generator.write_json(self._filesystem, summarized_full_resu lts, full_results_path)
492 488
493 full_results_path = self._filesystem.join(self._results_directory, "fail ing_results.json") 489 full_results_path = self._filesystem.join(self._results_directory, "fail ing_results.json")
494 # We write failing_results.json out as jsonp because we need to load it 490 # We write failing_results.json out as jsonp because we need to load it
495 # from a file url for results.html and Chromium doesn't allow that. 491 # from a file url for results.html and Chromium doesn't allow that.
496 json_results_generator.write_json(self._filesystem, summarized_failing_r esults, full_results_path, callback="ADD_RESULTS") 492 json_results_generator.write_json(self._filesystem, summarized_failing_r esults, full_results_path, callback="ADD_RESULTS")
497 493
494 # Write out the JSON files suitable for other tools to process.
495 # As the output can be quite large (as there are 60k+ tests) we also
496 # support only outputting the failing results.
497 if self._options.json_failing_test_results:
498 # FIXME(tansell): Make sure this includes an *unexpected* results
499 # (IE Passing when expected to be failing.)
500 json_results_generator.write_json(self._filesystem, summarized_faili ng_results, self._options.json_failing_test_results)
498 if self._options.json_test_results: 501 if self._options.json_test_results:
499 json_results_generator.write_json(self._filesystem, summarized_faili ng_results, self._options.json_test_results) 502 json_results_generator.write_json(self._filesystem, summarized_full_ results, self._options.json_test_results)
500 503
501 _log.debug("Finished writing JSON files.") 504 _log.debug("Finished writing JSON files.")
502 505
503 def _upload_json_files(self): 506 def _upload_json_files(self):
504 if not self._options.test_results_server: 507 if not self._options.test_results_server:
505 return 508 return
506 509
507 if not self._options.master_name: 510 if not self._options.master_name:
508 _log.error("--test-results-server was set, but --master-name was not . Not uploading JSON files.") 511 _log.error("--test-results-server was set, but --master-name was not . Not uploading JSON files.")
509 return 512 return
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 549
547 stats = {} 550 stats = {}
548 for result in initial_results.results_by_name.values(): 551 for result in initial_results.results_by_name.values():
549 if result.type != test_expectations.SKIP: 552 if result.type != test_expectations.SKIP:
550 stats[result.test_name] = {'results': (_worker_number(result.wor ker_name), result.test_number, result.pid, int( 553 stats[result.test_name] = {'results': (_worker_number(result.wor ker_name), result.test_number, result.pid, int(
551 result.test_run_time * 1000), int(result.total_run_time * 10 00))} 554 result.test_run_time * 1000), int(result.total_run_time * 10 00))}
552 stats_trie = {} 555 stats_trie = {}
553 for name, value in stats.iteritems(): 556 for name, value in stats.iteritems():
554 json_results_generator.add_path_to_trie(name, value, stats_trie) 557 json_results_generator.add_path_to_trie(name, value, stats_trie)
555 return stats_trie 558 return stats_trie
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698