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

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

Issue 774943007: Two tweaks for asan builds (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: review feedback 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 | « mojo/tools/get_test_list.py ('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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 return subprocess.call(['ninja', '-C', out_dir, 'root']) 146 return subprocess.call(['ninja', '-C', out_dir, 'root'])
147 147
148 148
149 def _run_tests(config, test_types): 149 def _run_tests(config, test_types):
150 """Runs the tests of the given type(s) for the given config.""" 150 """Runs the tests of the given type(s) for the given config."""
151 151
152 assert isinstance(test_types, list) 152 assert isinstance(test_types, list)
153 config = deepcopy(config) 153 config = deepcopy(config)
154 config.values['test_types'] = test_types 154 config.values['test_types'] = test_types
155 155
156 if _get_gn_arg_value(_get_out_dir(config), 'is_asan') == 'true':
157 config.values["sanitizer"] = Config.SANITIZER_ASAN
158
156 test_list = GetTestList(config) 159 test_list = GetTestList(config)
157 dry_run = config.values.get('dry_run') 160 dry_run = config.values.get('dry_run')
158 final_exit_code = 0 161 final_exit_code = 0
159 for entry in test_list: 162 for entry in test_list:
160 print 'Running: %s' % entry['name'] 163 print 'Running: %s' % entry['name']
161 print 'Command: %s' % entry['command'] 164 print 'Command: %s' % entry['command']
162 if dry_run: 165 if dry_run:
163 continue 166 continue
164 167
165 exit_code = subprocess.call(entry['command']) 168 exit_code = subprocess.call(entry['command'])
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 help='Run Dart unit tests (does not build).') 267 help='Run Dart unit tests (does not build).')
265 darttest_parser.set_defaults(func=darttest) 268 darttest_parser.set_defaults(func=darttest)
266 269
267 args = parser.parse_args() 270 args = parser.parse_args()
268 config = _args_to_config(args) 271 config = _args_to_config(args)
269 return args.func(config) 272 return args.func(config)
270 273
271 274
272 if __name__ == '__main__': 275 if __name__ == '__main__':
273 sys.exit(main()) 276 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/tools/get_test_list.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698