OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 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 """Runs all types of tests from one unified interface.""" | 7 """Runs all types of tests from one unified interface.""" |
8 | 8 |
9 import collections | 9 import collections |
10 import logging | 10 import logging |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 | 270 |
271 | 271 |
272 options.test_apk_path = os.path.join(constants.GetOutDirectory(), | 272 options.test_apk_path = os.path.join(constants.GetOutDirectory(), |
273 constants.SDK_BUILD_APKS_DIR, | 273 constants.SDK_BUILD_APKS_DIR, |
274 '%s.apk' % options.test_apk) | 274 '%s.apk' % options.test_apk) |
275 options.test_apk_jar_path = os.path.join( | 275 options.test_apk_jar_path = os.path.join( |
276 constants.GetOutDirectory(), | 276 constants.GetOutDirectory(), |
277 constants.SDK_BUILD_TEST_JAVALIB_DIR, | 277 constants.SDK_BUILD_TEST_JAVALIB_DIR, |
278 '%s.jar' % options.test_apk) | 278 '%s.jar' % options.test_apk) |
279 | 279 |
| 280 options.test_support_apk_path = '%sSupport%s' % ( |
| 281 os.path.splitext(options.test_apk_path)) |
| 282 |
| 283 |
280 return instrumentation_test_options.InstrumentationOptions( | 284 return instrumentation_test_options.InstrumentationOptions( |
281 options.tool, | 285 options.tool, |
282 options.cleanup_test_files, | 286 options.cleanup_test_files, |
283 options.push_deps, | 287 options.push_deps, |
284 options.annotations, | 288 options.annotations, |
285 options.exclude_annotations, | 289 options.exclude_annotations, |
286 options.test_filter, | 290 options.test_filter, |
287 options.test_data, | 291 options.test_data, |
288 options.save_perf_json, | 292 options.save_perf_json, |
289 options.screenshot_failures, | 293 options.screenshot_failures, |
290 options.wait_for_debugger, | 294 options.wait_for_debugger, |
291 options.coverage_dir, | 295 options.coverage_dir, |
292 options.test_apk, | 296 options.test_apk, |
293 options.test_apk_path, | 297 options.test_apk_path, |
294 options.test_apk_jar_path) | 298 options.test_apk_jar_path, |
| 299 options.test_support_apk_path |
| 300 ) |
295 | 301 |
296 | 302 |
297 def AddUIAutomatorTestOptions(option_parser): | 303 def AddUIAutomatorTestOptions(option_parser): |
298 """Adds UI Automator test options to |option_parser|.""" | 304 """Adds UI Automator test options to |option_parser|.""" |
299 | 305 |
300 option_parser.usage = '%prog uiautomator [options]' | 306 option_parser.usage = '%prog uiautomator [options]' |
301 option_parser.commands_dict = {} | 307 option_parser.commands_dict = {} |
302 option_parser.example = ( | 308 option_parser.example = ( |
303 '%prog uiautomator --test-jar=chrome_shell_uiautomator_tests' | 309 '%prog uiautomator --test-jar=chrome_shell_uiautomator_tests' |
304 ' --package=chrome_shell') | 310 ' --package=chrome_shell') |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 | 824 |
819 def main(): | 825 def main(): |
820 signal.signal(signal.SIGUSR1, DumpThreadStacks) | 826 signal.signal(signal.SIGUSR1, DumpThreadStacks) |
821 option_parser = command_option_parser.CommandOptionParser( | 827 option_parser = command_option_parser.CommandOptionParser( |
822 commands_dict=VALID_COMMANDS) | 828 commands_dict=VALID_COMMANDS) |
823 return command_option_parser.ParseAndExecute(option_parser) | 829 return command_option_parser.ParseAndExecute(option_parser) |
824 | 830 |
825 | 831 |
826 if __name__ == '__main__': | 832 if __name__ == '__main__': |
827 sys.exit(main()) | 833 sys.exit(main()) |
OLD | NEW |