Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: testing/scripts/get_compile_targets.py

Issue 676443002: Revert of Make get_compile_targets.py work on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 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 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import argparse 6 import argparse
7 import json 7 import json
8 import os 8 import os
9 import sys 9 import sys
10 10
(...skipping 14 matching lines...) Expand all
25 results = {} 25 results = {}
26 26
27 for filename in os.listdir(common.SCRIPT_DIR): 27 for filename in os.listdir(common.SCRIPT_DIR):
28 if not filename.endswith('.py'): 28 if not filename.endswith('.py'):
29 continue 29 continue
30 if filename in ('common.py', 'get_compile_targets.py'): 30 if filename in ('common.py', 'get_compile_targets.py'):
31 continue 31 continue
32 32
33 with common.temporary_file() as tempfile_path: 33 with common.temporary_file() as tempfile_path:
34 rc = common.run_command( 34 rc = common.run_command(
35 [sys.executable, os.path.join(common.SCRIPT_DIR, filename)] + 35 [os.path.join(common.SCRIPT_DIR, filename)] +
36 passthrough_args + 36 passthrough_args +
37 [ 37 [
38 'compile_targets', 38 'compile_targets',
39 '--output', tempfile_path 39 '--output', tempfile_path
40 ] 40 ]
41 ) 41 )
42 if rc != 0: 42 if rc != 0:
43 return rc 43 return rc
44 44
45 with open(tempfile_path) as f: 45 with open(tempfile_path) as f:
46 results[filename] = json.load(f) 46 results[filename] = json.load(f)
47 47
48 with open(args.output, 'w') as f: 48 with open(args.output, 'w') as f:
49 json.dump(results, f) 49 json.dump(results, f)
50 50
51 return 0 51 return 0
52 52
53 53
54 if __name__ == '__main__': 54 if __name__ == '__main__':
55 sys.exit(main(sys.argv[1:])) 55 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698