2 # Copyright 2017 The Chromium Authors
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
6 from __future__ import print_function
16 def noop_merge(output_json, jsons_to_merge):
17 """Use the first supplied JSON as the output JSON.
19 Primarily intended for unsharded tasks.
22 output_json: A path to a JSON file to which the results should be written.
23 jsons_to_merge: A list of paths to JSON files.
25 if len(jsons_to_merge) > 1:
26 print('Multiple JSONs provided: %s' % (','.join(jsons_to_merge)),
30 shutil.copyfile(jsons_to_merge[0], output_json)
32 with open(output_json, 'w') as f:
38 parser = merge_api.ArgumentParser()
39 args = parser.parse_args(raw_args)
41 return noop_merge(args.output_json, args.jsons_to_merge)
44 if __name__ == '__main__':
45 sys.exit(main(sys.argv[1:]))