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

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

Issue 878933003: Move the apptest runner and parts of mopy to the public SDK. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/tools/mojo_demo.py ('k') | mojo/tools/mopy/__init__.py » ('j') | 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
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
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())
OLDNEW
« no previous file with comments | « mojo/tools/mojo_demo.py ('k') | mojo/tools/mopy/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698