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" % ( | |
jbudorick
2014/06/19 15:35:09
two nits:
1) single quote strings
2) can this ju
aberent
2014/06/20 16:52:37
Both done.
On 2014/06/19 15:35:09, jbudorick wrot
| |
281 os.path.splitext(options.test_apk_path)[0], | |
282 os.path.splitext(options.test_apk_path)[1]) | |
283 | |
284 | |
280 return instrumentation_test_options.InstrumentationOptions( | 285 return instrumentation_test_options.InstrumentationOptions( |
281 options.tool, | 286 options.tool, |
282 options.cleanup_test_files, | 287 options.cleanup_test_files, |
283 options.push_deps, | 288 options.push_deps, |
284 options.annotations, | 289 options.annotations, |
285 options.exclude_annotations, | 290 options.exclude_annotations, |
286 options.test_filter, | 291 options.test_filter, |
287 options.test_data, | 292 options.test_data, |
288 options.save_perf_json, | 293 options.save_perf_json, |
289 options.screenshot_failures, | 294 options.screenshot_failures, |
290 options.wait_for_debugger, | 295 options.wait_for_debugger, |
291 options.coverage_dir, | 296 options.coverage_dir, |
292 options.test_apk, | 297 options.test_apk, |
293 options.test_apk_path, | 298 options.test_apk_path, |
294 options.test_apk_jar_path) | 299 options.test_apk_jar_path, |
300 options.test_support_apk_path | |
301 ) | |
295 | 302 |
296 | 303 |
297 def AddUIAutomatorTestOptions(option_parser): | 304 def AddUIAutomatorTestOptions(option_parser): |
298 """Adds UI Automator test options to |option_parser|.""" | 305 """Adds UI Automator test options to |option_parser|.""" |
299 | 306 |
300 option_parser.usage = '%prog uiautomator [options]' | 307 option_parser.usage = '%prog uiautomator [options]' |
301 option_parser.commands_dict = {} | 308 option_parser.commands_dict = {} |
302 option_parser.example = ( | 309 option_parser.example = ( |
303 '%prog uiautomator --test-jar=chrome_shell_uiautomator_tests' | 310 '%prog uiautomator --test-jar=chrome_shell_uiautomator_tests' |
304 ' --package=chrome_shell') | 311 ' --package=chrome_shell') |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
818 | 825 |
819 def main(): | 826 def main(): |
820 signal.signal(signal.SIGUSR1, DumpThreadStacks) | 827 signal.signal(signal.SIGUSR1, DumpThreadStacks) |
821 option_parser = command_option_parser.CommandOptionParser( | 828 option_parser = command_option_parser.CommandOptionParser( |
822 commands_dict=VALID_COMMANDS) | 829 commands_dict=VALID_COMMANDS) |
823 return command_option_parser.ParseAndExecute(option_parser) | 830 return command_option_parser.ParseAndExecute(option_parser) |
824 | 831 |
825 | 832 |
826 if __name__ == '__main__': | 833 if __name__ == '__main__': |
827 sys.exit(main()) | 834 sys.exit(main()) |
OLD | NEW |