OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2015 The Chromium Authors. All rights reserved. | 3 # Copyright 2015 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """Creates a script to run an android test using build/android/test_runner.py. | 7 """Creates a script to run an android test using build/android/test_runner.py. |
8 """ | 8 """ |
9 | 9 |
10 import argparse | 10 import argparse |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 """Returns the path relative to the output script directory.""" | 73 """Returns the path relative to the output script directory.""" |
74 return os.path.relpath(path, os.path.dirname(args.script_output_path)) | 74 return os.path.relpath(path, os.path.dirname(args.script_output_path)) |
75 | 75 |
76 test_runner_path = args.test_runner_path or os.path.join( | 76 test_runner_path = args.test_runner_path or os.path.join( |
77 os.path.dirname(__file__), os.path.pardir, 'test_runner.py') | 77 os.path.dirname(__file__), os.path.pardir, 'test_runner.py') |
78 test_runner_path = RelativizePathToScript(test_runner_path) | 78 test_runner_path = RelativizePathToScript(test_runner_path) |
79 | 79 |
80 test_runner_path_args = [] | 80 test_runner_path_args = [] |
81 if args.additional_apk_list: | 81 if args.additional_apk_list: |
82 args.additional_apks.extend( | 82 args.additional_apks.extend( |
83 build_utils.ParseGypList(args.additional_apk_list)) | 83 build_utils.ParseGnList(args.additional_apk_list)) |
84 if args.additional_apks: | 84 if args.additional_apks: |
85 test_runner_path_args.extend( | 85 test_runner_path_args.extend( |
86 ('--additional-apk', RelativizePathToScript(a)) | 86 ('--additional-apk', RelativizePathToScript(a)) |
87 for a in args.additional_apks) | 87 for a in args.additional_apks) |
88 if args.apk_under_test: | 88 if args.apk_under_test: |
89 test_runner_path_args.append( | 89 test_runner_path_args.append( |
90 ('--apk-under-test', RelativizePathToScript(args.apk_under_test))) | 90 ('--apk-under-test', RelativizePathToScript(args.apk_under_test))) |
91 if args.apk_under_test_incremental_install_script: | 91 if args.apk_under_test_incremental_install_script: |
92 test_runner_path_args.append( | 92 test_runner_path_args.append( |
93 ('--apk-under-test-incremental-install-script', | 93 ('--apk-under-test-incremental-install-script', |
(...skipping 28 matching lines...) Expand all Loading... |
122 | 122 |
123 os.chmod(args.script_output_path, 0750) | 123 os.chmod(args.script_output_path, 0750) |
124 | 124 |
125 if args.depfile: | 125 if args.depfile: |
126 build_utils.WriteDepfile( | 126 build_utils.WriteDepfile( |
127 args.depfile, | 127 args.depfile, |
128 build_utils.GetPythonDependencies()) | 128 build_utils.GetPythonDependencies()) |
129 | 129 |
130 if __name__ == '__main__': | 130 if __name__ == '__main__': |
131 sys.exit(main(sys.argv[1:])) | 131 sys.exit(main(sys.argv[1:])) |
OLD | NEW |