run-perf-tests throws an exception when the output json is malformed
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Aug 2012 18:23:25 +0000 (18:23 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Aug 2012 18:23:25 +0000 (18:23 +0000)
commitbc150532e41c3cba93c8252a17ba74c1344ab3ed
treef591a4baad2a85e4484bfcc71a23fec19bad0488
parent32c6befc6d9026d44184335ed9f43490a8cb6898
run-perf-tests throws an exception when the output json is malformed
https://bugs.webkit.org/show_bug.cgi?id=92887

Reviewed by Dirk Pranke.

Catch exceptions and gracefully fail. Also split _generate_json into smaller methods.

* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner):
(PerfTestsRunner.run):
(PerfTestsRunner._generate_output): Extracted from _generate_json.
(PerfTestsRunner._merge_source_json): Ditto; catch all exceptions since they are too many
exceptions to consder here.
(PerfTestsRunner._merge_outputs): Ditto.
(PerfTestsRunner._generate_output_files): Extracted from _generate_json.
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(_test_run_with_json_output): Don't assert logs when we except an non-zero exit code.
(create_runner_and_setup_results_template): Extracted from test_run_generates_results_page.
(test_run_generates_results_page):
(test_run_with_bad_output_json): Added.
(test_run_with_bad_json_source): Added.
(test_run_with_upload_json):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py
Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py