Lines Matching refs:args
79 def _run_multi_proc(func, *args, **kwargs): argument
91 proc = Process(target=func, *args, **kwargs)
113 args = parser.parse_args(pruned_argv)
114 args.custom_args = []
118 args.custom_args.append(atest_utils.quote(arg))
119 return args
168 def get_extra_args(args): argument
178 if args.wait_for_debugger:
180 steps = args.steps or constants.ALL_STEPS
206 not_match = [k for k in arg_maps if k not in vars(args)]
209 %(type(args).__name__, not_match))
210 extra_args.update({arg_maps.get(k): v for k, v in vars(args).items()
215 def _get_regression_detection_args(args, results_dir): argument
226 pre_patch_folder = (os.path.join(results_dir, 'baseline-metrics') if args.generate_baseline
227 else args.detect_regression.pop(0))
228 post_patch_folder = (os.path.join(results_dir, 'new-metrics') if args.generate_new_metrics
229 else args.detect_regression.pop(0))
235 def _validate_exec_mode(args, test_infos, host_tests=None): argument
251 if (host_tests or args.host) and constants.DEVICE_TEST in all_device_modes:
270 if not args.host and host_tests is None:
271 args.host = bool(constants.DEVICELESS_TEST in all_device_modes)
274 def _validate_tm_tests_exec_mode(args, test_infos): argument
290 if device_test_infos and not args.host:
291 _validate_exec_mode(args, device_test_infos, host_tests=False)
293 _validate_exec_mode(args, host_test_infos, host_tests=True)
296 def _will_run_tests(args): argument
308 return not (args.detect_regression and len(args.detect_regression) == 2)
313 def _has_valid_regression_detection_args(args): argument
322 if args.generate_baseline and args.generate_new_metrics:
326 if args.detect_regression is not None:
327 if not args.detect_regression:
331 elif len(args.detect_regression) == 1:
332 if args.generate_baseline or args.generate_new_metrics:
337 elif len(args.detect_regression) == 2:
338 if args.generate_baseline:
342 if args.generate_new_metrics:
353 def _has_valid_test_mapping_args(args): argument
365 is_test_mapping = atest_utils.is_test_mapping(args)
369 (args.generate_baseline, '--generate-baseline'),
370 (args.detect_regression, '--detect-regression'),
371 (args.generate_new_metrics, '--generate-new-metrics'),
380 def _validate_args(args): argument
390 if args.generate_baseline and args.generate_new_metrics:
394 if not _has_valid_regression_detection_args(args):
396 if not _has_valid_test_mapping_args(args):
505 for tests, args, test_type in test_runs:
512 results_dir, tests, args, mod_info, delay_print_summary=True)
583 def _non_action_validator(args): argument
595 if args.version:
600 if args.help:
603 if args.history:
605 args.history)
607 if args.latest_result:
612 if any((args.detect_regression,
613 args.generate_baseline,
614 args.generate_new_metrics)):
627 def _dry_run_validator(args, results_dir, extra_args, test_infos, mod_info): argument
639 args.tests.sort()
641 if args.verify_cmd_mapping:
643 atest_utils.handle_test_runner_cmd(' '.join(args.tests),
649 if args.update_cmd_mapping:
650 atest_utils.handle_test_runner_cmd(' '.join(args.tests),
672 def acloud_create_validator(results_dir, args): argument
686 if not any((args.acloud_create, args.start_avd)):
688 if args.start_avd:
689 args.acloud_create = ['--num=1']
690 acloud_args = ' '.join(args.acloud_create)
696 args=[report_file],
698 'no_metrics_notice':args.no_metrics})
708 def main(argv, results_dir, args): argument
719 _configure_logging(args.verbose)
720 _validate_args(args)
725 test_references=args.tests,
728 _non_action_validator(args)
729 proc_acloud, report_file = acloud_create_validator(results_dir, args)
730 mod_info = module_info.ModuleInfo(force_build=args.rebuild_module_info)
731 if args.rebuild_module_info:
736 print_cache_msg=not args.clear_cache)
737 if args.list_modules:
738 _print_testable_modules(mod_info, args.list_modules)
742 if _will_run_tests(args):
744 build_targets, test_infos = translator.translate(args)
745 if args.no_modules_in:
751 _validate_exec_mode(args, test_infos)
753 _validate_tm_tests_exec_mode(args, test_infos)
754 if args.info:
758 extra_args = get_extra_args(args)
759 if any((args.update_cmd_mapping, args.verify_cmd_mapping, args.dry_run)):
760 return _dry_run_validator(args, results_dir, extra_args, test_infos,
762 if args.detect_regression:
766 steps = args.steps if args.steps else constants.ALL_STEPS
768 if constants.TEST_STEP in steps and not args.rebuild_module_info:
776 success = atest_utils.build(build_targets, verbose=args.verbose)
783 if args.rebuild_module_info:
828 if args.detect_regression:
829 regression_args = _get_regression_detection_args(args, results_dir)