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 |
11 import platform | 11 import platform |
12 import re | 12 import re |
13 import subprocess | 13 import subprocess |
14 import sys | 14 import sys |
15 | 15 |
16 from get_test_list import GetTestList | 16 import add_sdk_tools_to_path |
17 from mopy.config import Config | 17 from mopy.config import Config |
18 from mopy.paths import Paths | 18 from mopy.paths import Paths |
19 from mopy.gn import GNArgsForConfig, ParseGNConfig, CommandLineForGNArgs | 19 from mopy.gn import GNArgsForConfig, ParseGNConfig, CommandLineForGNArgs |
20 | 20 |
| 21 from get_test_list import GetTestList |
| 22 |
21 | 23 |
22 def _args_to_config(args): | 24 def _args_to_config(args): |
23 # Default to host OS. | 25 # Default to host OS. |
24 target_os = None | 26 target_os = None |
25 if args.android: | 27 if args.android: |
26 target_os = Config.OS_ANDROID | 28 target_os = Config.OS_ANDROID |
27 elif args.chromeos: | 29 elif args.chromeos: |
28 target_os = Config.OS_CHROMEOS | 30 target_os = Config.OS_CHROMEOS |
29 | 31 |
30 if args.cpu_arch is None and args.android: | 32 if args.cpu_arch is None and args.android: |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 help='Run NaCl unit tests (does not build).') | 238 help='Run NaCl unit tests (does not build).') |
237 nacltest_parser.set_defaults(func=nacltest) | 239 nacltest_parser.set_defaults(func=nacltest) |
238 | 240 |
239 args = parser.parse_args() | 241 args = parser.parse_args() |
240 config = _args_to_config(args) | 242 config = _args_to_config(args) |
241 return args.func(config) | 243 return args.func(config) |
242 | 244 |
243 | 245 |
244 if __name__ == '__main__': | 246 if __name__ == '__main__': |
245 sys.exit(main()) | 247 sys.exit(main()) |
OLD | NEW |