| 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 """A test runner for application tests.""" | 6 """A test runner for application tests.""" |
| 7 | 7 |
| 8 import argparse | 8 import argparse |
| 9 import logging | 9 import logging |
| 10 import os.path | 10 import os.path |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 InitLogging(args.verbose_count) | 36 InitLogging(args.verbose_count) |
| 37 config = ConfigForGNArgs(ParseGNConfig(args.build_dir)) | 37 config = ConfigForGNArgs(ParseGNConfig(args.build_dir)) |
| 38 paths = Paths(config) | 38 paths = Paths(config) |
| 39 command_line = [os.path.join(os.path.dirname(__file__), os.path.pardir, | 39 command_line = [os.path.join(os.path.dirname(__file__), os.path.pardir, |
| 40 "devtools", "common", "mojo_test"), | 40 "devtools", "common", "mojo_test"), |
| 41 str(args.test_list_file)] | 41 str(args.test_list_file)] |
| 42 | 42 |
| 43 if config.target_os == Config.OS_ANDROID: | 43 if config.target_os == Config.OS_ANDROID: |
| 44 command_line.append("--android") | 44 command_line.append("--android") |
| 45 command_line.append("--adb-path=" + paths.adb_path) | 45 command_line.append("--adb-path=" + paths.adb_path) |
| 46 command_line.append("--origin-path=" + paths.build_dir) | 46 command_line.append("--origin=" + paths.build_dir) |
| 47 | 47 |
| 48 command_line.append("--shell-path=" + paths.target_mojo_shell_path) | 48 command_line.append("--shell-path=" + paths.target_mojo_shell_path) |
| 49 if args.verbose_count: | 49 if args.verbose_count: |
| 50 command_line.append("--verbose") | 50 command_line.append("--verbose") |
| 51 | 51 |
| 52 gtest.set_color() | 52 gtest.set_color() |
| 53 print "Running " + str(command_line) | 53 print "Running " + str(command_line) |
| 54 ret = subprocess.call(command_line) | 54 ret = subprocess.call(command_line) |
| 55 return ret | 55 return ret |
| 56 | 56 |
| 57 | 57 |
| 58 if __name__ == '__main__': | 58 if __name__ == '__main__': |
| 59 sys.exit(main()) | 59 sys.exit(main()) |
| OLD | NEW |