Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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']) | 144 'root']) |
| 145 else: | 145 else: |
| 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 if _get_gn_arg_value(_get_out_dir(config), 'is_asan') == 'true': | |
|
viettrungluu
2014/12/03 22:15:59
Ugh, but I guess I can live with it for now.
Howe
sky
2014/12/03 23:15:15
Done.
| |
| 153 config.values["sanitizer"] = Config.SANITIZER_ASAN | |
| 154 | |
| 152 assert isinstance(test_types, list) | 155 assert isinstance(test_types, list) |
| 153 config = deepcopy(config) | 156 config = deepcopy(config) |
| 154 config.values['test_types'] = test_types | 157 config.values['test_types'] = test_types |
| 155 | 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'] |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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()) |
| OLD | NEW |