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

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

Issue 809583002: GN: add default target. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Deprecate Created 6 years 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 | « README.md ('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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 # Use the configured goma directory. 133 # Use the configured goma directory.
134 local_goma_dir = _get_gn_arg_value(out_dir, 'goma_dir') 134 local_goma_dir = _get_gn_arg_value(out_dir, 'goma_dir')
135 print 'Ensuring goma (in %s) started ...' % local_goma_dir 135 print 'Ensuring goma (in %s) started ...' % local_goma_dir
136 command = ['python', 136 command = ['python',
137 os.path.join(local_goma_dir, 'goma_ctl.py'), 137 os.path.join(local_goma_dir, 'goma_ctl.py'),
138 'ensure_start'] 138 'ensure_start']
139 exit_code = subprocess.call(command) 139 exit_code = subprocess.call(command)
140 if exit_code: 140 if exit_code:
141 return exit_code 141 return exit_code
142 142
143 return subprocess.call(['ninja', '-j', '1000', '-l', '100', '-C', out_dir, 143 return subprocess.call(['ninja', '-j', '1000', '-l', '100', '-C', out_dir])
144 'root'])
145 else: 144 else:
146 return subprocess.call(['ninja', '-C', out_dir, 'root']) 145 return subprocess.call(['ninja', '-C', out_dir])
147 146
148 147
149 def _run_tests(config, test_types): 148 def _run_tests(config, test_types):
150 """Runs the tests of the given type(s) for the given config.""" 149 """Runs the tests of the given type(s) for the given config."""
151 150
152 assert isinstance(test_types, list) 151 assert isinstance(test_types, list)
153 config = deepcopy(config) 152 config = deepcopy(config)
154 config.values['test_types'] = test_types 153 config.values['test_types'] = test_types
155 154
156 test_list = GetTestList(config) 155 test_list = GetTestList(config)
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 help='Run Dart unit tests (does not build).') 264 help='Run Dart unit tests (does not build).')
266 darttest_parser.set_defaults(func=darttest) 265 darttest_parser.set_defaults(func=darttest)
267 266
268 args = parser.parse_args() 267 args = parser.parse_args()
269 config = _args_to_config(args) 268 config = _args_to_config(args)
270 return args.func(config) 269 return args.func(config)
271 270
272 271
273 if __name__ == '__main__': 272 if __name__ == '__main__':
274 sys.exit(main()) 273 sys.exit(main())
OLDNEW
« no previous file with comments | « README.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698