def _UploadToDasboard(args): build_properties = json.loads(args.build_properties) exit_code = _ConfigurePythonPath(build_properties['outdir']) if exit_code != 0: return exit_code import catapult_uploader perftest_outputs = [ f.absolute() for f in Path(args.task_output_dir).rglob('perftest-output*') if f.is_file() ] for perftest_output in perftest_outputs: uploader_options = catapult_uploader.UploaderOptions( perf_dashboard_machine_group=( build_properties['perf_dashboard_machine_group']), bot=build_properties['bot'], webrtc_git_hash=build_properties['webrtc_git_hash'], commit_position=build_properties['commit_position'], build_page_url=build_properties['build_page_url'], dashboard_url=build_properties['dashboard_url'], test_suite=args.test_suite, input_results_file=perftest_output, ) exit_code = catapult_uploader.UploadToDashboard(uploader_options) if exit_code != 0: return exit_code return 0
def main(args): parser = _CreateParser() options = parser.parse_args(args) _ConfigurePythonPath(options) import catapult_uploader return catapult_uploader.UploadToDashboard(options)
def main(args): parser = _CreateParser() options = parser.parse_args(args) _ConfigurePythonPath(options.outdir) import catapult_uploader uploader_options = catapult_uploader.UploaderOptions( perf_dashboard_machine_group=options.perf_dashboard_machine_group, bot=options.bot, test_suite=options.test_suite, webrtc_git_hash=options.webrtc_git_hash, commit_position=options.commit_position, build_page_url=options.build_page_url, dashboard_url=options.dashboard_url, input_results_file=options.input_results_file, output_json_file=options.output_json_file, ) return catapult_uploader.UploadToDashboard(uploader_options)