1#!/usr/bin/env python 2# 3# Copyright 2021 The ANGLE Project Authors. All rights reserved. 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6""" Merges dEQP sharded test results in the ANGLE testing infrastucture.""" 7 8import os 9import sys 10if sys.version_info.major != 3 and __name__ == '__main__': 11 # Swarming prepends sys.executable so we get python2 regardless of shebang. 12 # Spawn itself with vpython3 instead. 13 import subprocess 14 sys.exit(subprocess.call(['vpython3', os.path.realpath(__file__)] + sys.argv[1:])) 15 16import pathlib # python3 17 18PY_UTILS = str(pathlib.Path(__file__).resolve().parents[1] / 'src' / 'tests' / 'py_utils') 19if PY_UTILS not in sys.path: 20 os.stat(PY_UTILS) and sys.path.insert(0, PY_UTILS) 21import angle_path_util 22 23angle_path_util.AddDepsDirToPath('testing/merge_scripts') 24import merge_api 25import standard_isolated_script_merge 26 27 28def main(raw_args): 29 30 parser = merge_api.ArgumentParser() 31 args = parser.parse_args(raw_args) 32 33 # TODO(jmadill): Merge QPA files into one. http://anglebug.com/42263789 34 35 return standard_isolated_script_merge.StandardIsolatedScriptMerge( 36 args.output_json, args.summary_json, args.jsons_to_merge) 37 38 39if __name__ == '__main__': 40 sys.exit(main(sys.argv[1:])) 41