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

Side by Side Diff: mojo/tools/run_mojo_python_bindings_tests.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, 11 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/perf_test_runner.py ('k') | mojo/tools/run_mojo_python_tests.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 import os 6 import os
7 import sys 7 import sys
8 8
9 from mopy.mojo_python_tests_runner import MojoPythonTestRunner 9 from mopy_internal.mojo_python_tests_runner import MojoPythonTestRunner
10 10
11 11
12 class PythonBindingsTestRunner(MojoPythonTestRunner): 12 class PythonBindingsTestRunner(MojoPythonTestRunner):
13 def add_custom_commandline_options(self, parser): 13 def add_custom_commandline_options(self, parser):
14 parser.add_argument('--build-dir', action='store', 14 parser.add_argument('--build-dir', action='store',
15 help='path to the build output directory') 15 help='path to the build output directory')
16 16
17 def apply_customization(self, args): 17 def apply_customization(self, args):
18 if args.build_dir: 18 if args.build_dir:
19 python_build_dir = os.path.join(args.build_dir, 'python') 19 python_build_dir = os.path.join(args.build_dir, 'python')
20 if python_build_dir not in sys.path: 20 if python_build_dir not in sys.path:
21 sys.path.append(python_build_dir) 21 sys.path.append(python_build_dir)
22 python_gen_dir = os.path.join( 22 python_gen_dir = os.path.join(
23 args.build_dir, 23 args.build_dir,
24 'gen', 'mojo', 'public', 'interfaces', 'bindings', 'tests') 24 'gen', 'mojo', 'public', 'interfaces', 'bindings', 'tests')
25 if python_gen_dir not in sys.path: 25 if python_gen_dir not in sys.path:
26 sys.path.append(python_gen_dir) 26 sys.path.append(python_gen_dir)
27 27
28 28
29 def main(): 29 def main():
30 runner = PythonBindingsTestRunner(os.path.join('mojo', 'python', 'tests')) 30 runner = PythonBindingsTestRunner(os.path.join('mojo', 'python', 'tests'))
31 sys.exit(runner.run()) 31 sys.exit(runner.run())
32 32
33 33
34 if __name__ == '__main__': 34 if __name__ == '__main__':
35 sys.exit(main()) 35 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/tools/perf_test_runner.py ('k') | mojo/tools/run_mojo_python_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698