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

Side by Side Diff: mojo/tools/mojob.py

Issue 840653003: Pull in native_client and build tests. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 11 months 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 | « mojo/nacl/BUILD.gn ('k') | 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 # This a simple script to make building/testing Mojo components easier. 6 # This a simple script to make building/testing Mojo components easier.
7 7
8 import argparse 8 import argparse
9 from copy import deepcopy 9 from copy import deepcopy
10 import os 10 import os
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 elif args.goma and os.path.exists(goma_home_dir): 45 elif args.goma and os.path.exists(goma_home_dir):
46 additional_args['use_goma'] = True 46 additional_args['use_goma'] = True
47 additional_args['goma_dir'] = goma_home_dir 47 additional_args['goma_dir'] = goma_home_dir
48 else: 48 else:
49 additional_args['use_goma'] = False 49 additional_args['use_goma'] = False
50 additional_args['goma_dir'] = None 50 additional_args['goma_dir'] = None
51 51
52 if 'with_dart' in args: 52 if 'with_dart' in args:
53 additional_args['with_dart'] = args.with_dart 53 additional_args['with_dart'] = args.with_dart
54 54
55 if 'nacl' in args:
56 additional_args['use_nacl'] = args.nacl
57
55 if 'dry_run' in args: 58 if 'dry_run' in args:
56 additional_args['dry_run'] = args.dry_run 59 additional_args['dry_run'] = args.dry_run
57 60
58 if 'builder_name' in args: 61 if 'builder_name' in args:
59 additional_args['builder_name'] = args.builder_name 62 additional_args['builder_name'] = args.builder_name
60 if 'build_number' in args: 63 if 'build_number' in args:
61 additional_args['build_number'] = args.build_number 64 additional_args['build_number'] = args.build_number
62 if 'master_name' in args: 65 if 'master_name' in args:
63 additional_args['master_name'] = args.master_name 66 additional_args['master_name'] = args.master_name
64 if 'test_results_server' in args: 67 if 'test_results_server' in args:
(...skipping 28 matching lines...) Expand all
93 96
94 if config.values['use_goma']: 97 if config.values['use_goma']:
95 gn_args.append('use_goma=true') 98 gn_args.append('use_goma=true')
96 gn_args.append(r'''goma_dir=\"%s\"''' % config.values['goma_dir']) 99 gn_args.append(r'''goma_dir=\"%s\"''' % config.values['goma_dir'])
97 else: 100 else:
98 gn_args.append('use_goma=false') 101 gn_args.append('use_goma=false')
99 102
100 if config.values['with_dart']: 103 if config.values['with_dart']:
101 gn_args.append('mojo_use_dart=true') 104 gn_args.append('mojo_use_dart=true')
102 105
106 if config.values['use_nacl']:
107 gn_args.append('mojo_use_nacl=true')
108
103 if config.target_os == Config.OS_ANDROID: 109 if config.target_os == Config.OS_ANDROID:
104 gn_args.append(r'''os=\"android\" cpu_arch=\"arm\"''') 110 gn_args.append(r'''os=\"android\" cpu_arch=\"arm\"''')
105 elif config.target_os == Config.OS_CHROMEOS: 111 elif config.target_os == Config.OS_CHROMEOS:
106 gn_args.append(r'''os=\"chromeos\" ui_base_build_ime=false 112 gn_args.append(r'''os=\"chromeos\" ui_base_build_ime=false
107 use_system_harfbuzz=false''') 113 use_system_harfbuzz=false''')
108 114
109 out_dir = _get_out_dir(config) 115 out_dir = _get_out_dir(config)
110 command.append(out_dir) 116 command.append(out_dir)
111 command.append('--args="%s"' % ' '.join(gn_args)) 117 command.append('--args="%s"' % ' '.join(gn_args))
112 118
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 215
210 sync_parser = subparsers.add_parser('sync', parents=[parent_parser], 216 sync_parser = subparsers.add_parser('sync', parents=[parent_parser],
211 help='Sync using gclient (does not run gn).') 217 help='Sync using gclient (does not run gn).')
212 sync_parser.set_defaults(func=sync) 218 sync_parser.set_defaults(func=sync)
213 219
214 gn_parser = subparsers.add_parser('gn', parents=[parent_parser], 220 gn_parser = subparsers.add_parser('gn', parents=[parent_parser],
215 help='Run gn for mojo (does not sync).') 221 help='Run gn for mojo (does not sync).')
216 gn_parser.set_defaults(func=gn) 222 gn_parser.set_defaults(func=gn)
217 gn_parser.add_argument('--with-dart', help='Configure the Dart bindings', 223 gn_parser.add_argument('--with-dart', help='Configure the Dart bindings',
218 action='store_true') 224 action='store_true')
225 gn_parser.add_argument('--nacl', help='Add in NaCl', action='store_true')
219 clang_group = gn_parser.add_mutually_exclusive_group() 226 clang_group = gn_parser.add_mutually_exclusive_group()
220 clang_group.add_argument('--clang', help='Use Clang (default)', default=None, 227 clang_group.add_argument('--clang', help='Use Clang (default)', default=None,
221 action='store_true') 228 action='store_true')
222 clang_group.add_argument('--gcc', help='Use GCC', 229 clang_group.add_argument('--gcc', help='Use GCC',
223 dest='clang', action='store_false') 230 dest='clang', action='store_false')
224 goma_group = gn_parser.add_mutually_exclusive_group() 231 goma_group = gn_parser.add_mutually_exclusive_group()
225 goma_group.add_argument('--goma', 232 goma_group.add_argument('--goma',
226 help='Use Goma (if $GOMA_DIR is set or $HOME/goma ' 233 help='Use Goma (if $GOMA_DIR is set or $HOME/goma '
227 'exists; default)', 234 'exists; default)',
228 default=True, 235 default=True,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 help='Run Dart unit tests (does not build).') 271 help='Run Dart unit tests (does not build).')
265 darttest_parser.set_defaults(func=darttest) 272 darttest_parser.set_defaults(func=darttest)
266 273
267 args = parser.parse_args() 274 args = parser.parse_args()
268 config = _args_to_config(args) 275 config = _args_to_config(args)
269 return args.func(config) 276 return args.func(config)
270 277
271 278
272 if __name__ == '__main__': 279 if __name__ == '__main__':
273 sys.exit(main()) 280 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/nacl/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698