• Home
  • Raw
  • Download

Lines Matching +full:additional +full:- +full:args

4 # Use of this source code is governed by a BSD-style license that can be
30 import _strptime # pylint: disable=unused-import
32 # pylint: disable=ungrouped-imports
59 from lib.results import result_sink # pylint: disable=import-error
77 Args:
83 '--test-launcher-retry-limit',
84 '--test_launcher_retry_limit',
85 '--num_retries', '--num-retries',
86 '--isolated-script-test-launcher-retry-limit',
91 '--test-launcher-summary-output',
92 '--json-results-file',
95 'Note that this will also trigger saving per-test logcats to '
98 '--test-launcher-shard-index',
102 '--test-launcher-total-shards',
112 """Adds arguments to support passing command-line flags to the device."""
114 '--device-flags-file',
117 'command-line flags to set on the device')
119 '--use-apk-under-test-flags-file',
123 parser.add_argument('--variations-test-seed-path',
127 parser.add_argument('--webview-variations-test-seed-path',
140 '--trace-output',
145 '--trace-all',
157 '--debug',
163 '--release',
169 '--break-on-failure', '--break_on_failure',
176 '--enable-platform-mode',
184 '-e', '--environment',
189 '--local-output',
194 parser.add_argument('--list-tests',
198 parser.add_argument('--wrapper-script-args',
199 help='A string of args that were passed to the wrapper '
214 '--fast-local-dev',
218 help='Alias for: --num-retries=0 --enable-device-cache '
219 '--enable-concurrent-adb --skip-clear-data '
220 '--extract-test-list-from-filter --use-persistent-shell --local-output')
225 '--flakiness-dashboard-server',
229 '--gs-results-bucket',
233 '--output-directory',
237 ' precedence over --debug and --release')
239 '-v', '--verbose',
244 '--repeat', '--gtest_repeat', '--gtest-repeat',
245 '--isolated-script-test-repeat',
251 '--use-persistent-shell',
255 parser.add_argument('--disable-test-server',
263 '--gtest_also_run_disabled_tests', '--gtest-also-run-disabled-tests',
264 '--isolated-script-test-also-run-disabled-tests',
269 parser.add_argument('--isolated-script-test-output',
271 parser.add_argument('--isolated-script-test-perf-output',
273 parser.add_argument('--timeout-scale',
280 def ProcessCommonOptions(args): argument
282 run_tests_helper.SetLogLevel(args.verbose_count, add_handler=False)
283 if args.verbose_count > 0:
290 constants.SetBuildType(args.build_type)
291 if args.output_directory:
292 constants.SetOutputDirectory(args.output_directory)
301 '--adb-path',
306 '--use-local-devil-tools',
309 parser.add_argument('--denylist-file',
313 '-d', '--device', nargs='+',
317 '--enable-concurrent-adb',
322 '--enable-device-cache',
326 '--skip-clear-data',
332 '--recover-devices',
338 '--upload-logcats-file',
345 '--logcat-output-dir', type=os.path.realpath,
349 '--logcat-output-file', type=os.path.realpath,
354 '--force-main-user',
356 help='Force the applicable adb commands to run with "--user" param set '
362 """Adds emulator-specific options to |parser|."""
366 '--avd-config',
372 '--emulator-count',
377 '--emulator-window',
382 '--emulator-debug-tags',
383 help='Comma-separated list of debug tags. This can be used to enable or '
385 'init,snapshot. See "emulator -help-debug-tags" '
388 '--emulator-enable-network',
399 '--additional-apk',
402 help='Additional apk that must be installed on '
405 '--app-data-file',
410 '--app-data-file-dir',
412 ' saved. Used with --app-data-file.')
414 '--enable-xml-result-parsing',
417 '--executable-dist-dir',
420 " (non-apk) tests.")
422 '--extract-test-list-from-filter',
430 '--gs-test-artifacts-bucket',
434 '--render-test-output-dir',
437 '--runtime-deps-path',
441 '-t', '--shard-timeout',
445 '--store-tombstones',
449 '-s', '--suite',
453 '--test-apk-incremental-install-json',
456 parser.add_argument('--test-launcher-batch-limit',
460 'Ignores non-positive ints and those greater than '
463 '-w', '--wait-for-java-debugger', action='store_true',
467 '--coverage-dir',
471 '--use-existing-test-data',
477 parser.add_argument('--gtest_also_run_pre_tests',
478 '--gtest-also-run-pre-tests',
489 parser.add_argument('--additional-apex',
494 help='Additional apex that must be installed on '
497 '--additional-apk',
500 help='Additional apk that must be installed on '
502 parser.add_argument('--forced-queryable-additional-apk',
507 help='Configures an additional-apk to be forced '
509 parser.add_argument('--instant-additional-apk',
514 help='Configures an additional-apk to be an instant APK')
516 '-A', '--annotation',
518 help='Comma-separated list of annotations. Run only tests with any of '
520 'key-values pair. A test that has no annotation is considered '
522 # TODO(jbudorick): Remove support for name-style APK specification once
525 '--apk-under-test',
528 '--store-data-dependencies-in-temp',
532 '--module',
538 '--fake-module',
544 '--additional-locale',
548 'for when --apk-under-test is an Android App Bundle.')
550 '--coverage-dir',
555 '--disable-dalvik-asserts',
559 '--proguard-mapping-path',
563 '-E', '--exclude-annotation',
565 help='Comma-separated list of annotations. Exclude tests with these '
568 '--enable-breakpad-dump',
572 '--replace-system-package',
578 '--remove-system-package',
584 'Unlike --replace-system-package, the app will not be restored after '
587 '--use-voice-interaction-service',
592 '--use-webview-provider',
599 '--webview-command-line-arg',
604 '--webview-process-mode',
609 '--run-setup-command',
616 '--run-teardown-command',
623 '--runtime-deps-path',
627 '--screenshot-directory',
631 '--store-tombstones',
635 '--strict-mode',
637 help='StrictMode command-line flag set on the device, '
641 '--test-apk',
645 '--test-apk-as-instant',
650 '--test-launcher-batch-limit',
657 '--is-unit-test',
662 '-w', '--wait-for-java-debugger', action='store_true',
667 parser.add_argument('--wpr-enable-record',
674 '--approve-app-links',
676 'package and domain, example usage: --approve-app-links '
682 '--apk-under-test-incremental-install-json',
685 '--test-apk-incremental-install-json',
694 '--code-review-system',
695 help='A non-default code review system to pass to pass to Gold, if '
698 '--continuous-integration-system',
699 help='A non-default continuous integration system to pass to Gold, if '
702 '--git-revision', help='The git commit currently being tested.')
704 '--gerrit-issue',
707 '--gerrit-patchset',
710 '--buildbucket-id',
715 '--local-pixel-tests',
721 'Running in local mode also implies --no-luci-auth. If both this '
722 'and --no-local-pixel-tests are left unset, the test harness will '
726 '--no-local-pixel-tests',
729 help='Specifies to run the Skia Gold pixel tests in non-local (bot) '
731 'triage links are generated. If both this and --local-pixel-tests '
736 '--no-luci-auth',
740 'with Skia Gold, instead relying on gsutil to be pre-authenticated. '
743 '--bypass-skia-gold-functionality',
757 '-s', '--test-suite', required=True,
760 '--test-apk-as-instant',
765 '--additional-apk',
770 help='Additional apk that must be installed on '
773 '--use-webview-provider',
780 '--tradefed-executable',
782 help='Location of the cts-tradefed script')
784 '--tradefed-aapt-path',
788 '--tradefed-adb-path',
794 '--apk-under-test',
797 '--use-apk-under-test-flags-file',
801 '-E', '--exclude-annotation',
812 '--coverage-on-the-fly',
814 help='Generate coverage data by Jacoco on-the-fly instrumentation.')
816 '--coverage-dir', type=os.path.realpath,
819 '--package-filter',
822 '--runner-filter',
824 parser.add_argument('--json-config',
827 '--shards',
830 'is supported when test-filter is specified. Values less than 1 will '
832 parser.add_argument('--shard-filter',
835 '-s', '--test-suite', required=True,
839 '-w', '--wait-for-java-debugger', action='store_const', const='8701',
840 dest='debug_socket', help='Alias for --debug-socket=8701')
842 '--debug-socket',
849 '--robolectric-runtime-deps-dir',
851 parser.add_argument('--native-libs-dir',
854 '--resource-apk',
857 parser.add_argument('--shadows-allowlist',
866 '--test-apk',
876 parser.add_argument('--browser',
882 '--category',
887 '--event-count',
891 '--seed',
893 help='Seed value for pseudo-random generator. Same seed value generates '
896 '--throttle',
905 parser.add_argument('-s',
906 '--suite',
914 """Creates a dict mapping classes to file names from size-info apk."""
916 test_apk_size_info = os.path.join(constants.GetOutDirectory(), 'size-info',
938 def _RunPythonTests(args): argument
940 suite_vars = constants.PYTHON_UNIT_TEST_SUITES[args.suite_name]
949 runner = unittest.TextTestRunner(verbosity=1+args.verbose_count)
960 def RunTestsCommand(args, result_sink_client=None): argument
963 Args:
964 args: argparse.Namespace object.
974 command = args.command
976 ProcessCommonOptions(args)
978 if args.enable_platform_mode or command in _DEFAULT_PLATFORM_MODE_TESTS:
979 return RunTestsInPlatformMode(args, result_sink_client)
982 return _RunPythonTests(args)
989 Args:
997 # Some tests put in non utf-8 char as part of the test
998 # which breaks uploads, so need to decode and re-encode.
1001 log_decoded = log_decoded.decode('utf-8', 'replace')
1009 logging.info('Skipping non-https link %r (%s) for test %s.', link_name,
1034 def RunTestsInPlatformMode(args, result_sink_client=None): argument
1040 if args.command not in _SUPPORTED_IN_PLATFORM_MODE:
1041 infra_error('%s is not yet supported in platform mode' % args.command)
1051 # pylint: disable=protected-access
1091 if args.json_results_file and os.path.exists(json_file.name):
1092 shutil.move(json_file.name, args.json_results_file)
1093 elif args.isolated_script_test_output and os.path.exists(json_file.name):
1094 shutil.move(json_file.name, args.isolated_script_test_output)
1106 if args.isolated_script_test_output:
1121 # requires the size-info file.
1123 test_class_to_file_name_dict = _CreateClassToFileNameDict(args.test_apk)
1140 if not args.logcat_output_file:
1142 elif not os.path.exists(args.logcat_output_file):
1145 with open(args.logcat_output_file) as src:
1156 'upload_logcats_file' in args and args.upload_logcats_file)
1158 save_detailed_results = (args.local_output or not local_utils.IsOnSwarming()
1159 ) and not args.isolated_script_test_output
1163 out_manager = output_manager_factory.CreateOutputManager(args)
1165 args, out_manager, infra_error)
1166 test_instance = test_instance_factory.CreateTestInstance(args, infra_error)
1172 if args.list_tests:
1181 sys.stderr.write('Test does not support --list-tests (type={}).\n'.format(
1182 args.command))
1192 repetitions = (range(args.repeat +
1193 1) if args.repeat >= 0 else itertools.count())
1201 # the up-to-date results and those can be written to disk.
1223 annotation=getattr(args, 'annotations', None),
1224 flakiness_server=getattr(args, 'flakiness_dashboard_server',
1227 failed_tests = (iteration_results.GetNotPass() -
1230 _LogRerunStatement(failed_tests, args.wrapper_script_args)
1232 if args.break_on_failure and not iteration_results.DidRunPass():
1277 test_name=args.command,
1304 Args:
1306 wrapper_arg_str: A string of args that were passed to the called wrapper
1313 except: # pylint: disable=bare-except
1332 # This covers --test-filter=, --test-launcher-filter-file=, --gtest-filter=,
1333 # --test-filter *Foobar.baz, -f *foobar, --package-filter <package>,
1334 # --runner-filter <runner>.
1335 if 'filter' in arg or arg == '-f':
1349 rerun_arg_list.append('--test-launcher-filter-file=%s' % test_filter_file)
1372 help='googletest-based C++ tests')
1382 help='Webview CTS host-side tests')
1390 help='InstrumentationTestCase-based Java tests')
1401 help='JUnit4-based Java tests')
1427 args, unknown_args = parser.parse_known_args()
1430 if getattr(args, 'allow_unknown', None):
1431 args.command_line_flags = unknown_args
1435 # --enable-concurrent-adb does not handle device reboots gracefully.
1436 if getattr(args, 'enable_concurrent_adb', None):
1437 if getattr(args, 'replace_system_package', None):
1439 'Ignoring --enable-concurrent-adb due to --replace-system-package')
1440 args.enable_concurrent_adb = False
1441 elif getattr(args, 'system_packages_to_remove', None):
1443 'Ignoring --enable-concurrent-adb due to --remove-system-package')
1444 args.enable_concurrent_adb = False
1445 elif getattr(args, 'use_webview_provider', None):
1447 'Ignoring --enable-concurrent-adb due to --use-webview-provider')
1448 args.enable_concurrent_adb = False
1450 if (getattr(args, 'coverage_on_the_fly', False)
1451 and not getattr(args, 'coverage_dir', '')):
1452 parser.error('--coverage-on-the-fly requires --coverage-dir')
1454 if (getattr(args, 'debug_socket', None)
1455 or getattr(args, 'wait_for_java_debugger', None)):
1456 args.num_retries = 0
1458 # Result-sink may not exist in the environment if rdb stream is not enabled.
1462 return RunTestsCommand(args, result_sink_client)
1479 # hangs indefinitely (on swarming - until it hits 20min timeout).
1484 os._exit(exit_code) # pylint: disable=protected-access