2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
15 parser
= argparse
.ArgumentParser()
16 parser
.add_argument('--output', required
=True)
17 parser
.add_argument('args', nargs
=argparse
.REMAINDER
)
19 args
= parser
.parse_args(argv
)
21 passthrough_args
= args
.args
22 if passthrough_args
[0] == '--':
23 passthrough_args
= passthrough_args
[1:]
27 for filename
in os
.listdir(common
.SCRIPT_DIR
):
28 if not filename
.endswith('.py'):
30 if filename
in ('common.py', 'get_compile_targets.py'):
33 with common
.temporary_file() as tempfile_path
:
34 rc
= common
.run_command(
35 [sys
.executable
, os
.path
.join(common
.SCRIPT_DIR
, filename
)] +
39 '--output', tempfile_path
45 with
open(tempfile_path
) as f
:
46 results
[filename
] = json
.load(f
)
48 with
open(args
.output
, 'w') as f
:
54 if __name__
== '__main__':
55 sys
.exit(main(sys
.argv
[1:]))