Lines Matching refs:args

838 def _VerifyLocalArgs(args):  argument
850 if args.local_image and not os.path.exists(args.local_image):
852 "Specified path doesn't exist: %s" % args.local_image)
854 if args.local_instance_dir and not os.path.exists(args.local_instance_dir):
856 "Specified path doesn't exist: %s" % args.local_instance_dir)
858 if not (args.local_system_image is None or
859 args.avd_type in (constants.TYPE_CF, constants.TYPE_GF)):
862 args.avd_type)
864 if args.local_instance is None and args.local_image is not None and (
865 args.kernel_branch or args.kernel_build_id):
870 args.local_image if args.local_image else
873 if (args.local_system_image and
874 not os.path.exists(args.local_system_image)):
876 "Specified path doesn't exist: %s" % args.local_system_image)
878 for tool_dir in args.local_tool:
884 def _VerifyHostArgs(args): argument
894 if args.remote_host and args.local_instance is not None:
898 if args.remote_host and args.num > 1:
902 if args.host_user != constants.GCE_USER and args.remote_host is None:
906 if args.host_ssh_private_key_path and args.remote_host is None:
910 if args.remote_image_dir:
911 if args.remote_host is None:
915 remote_path.normpath(args.remote_image_dir)) in ("..", "."):
920 def _VerifyGoldfishArgs(args): argument
931 args.emulator_build_id,
932 args.emulator_build_target,
933 args.emulator_zip
935 if args.avd_type != constants.TYPE_GF and any(goldfish_only_flags):
941 args.kernel_build_id,
942 args.kernel_branch,
944 if args.avd_type == constants.TYPE_GF and any(remote_kernel_flags):
949 args.boot_build_id,
950 args.boot_build_target,
951 args.boot_branch,
952 args.boot_artifact,
954 if (args.avd_type == constants.TYPE_GF and any(remote_boot_flags) and
962 args.system_build_target,
963 args.system_build_id,
964 args.system_branch,
966 if (args.avd_type == constants.TYPE_GF and any(remote_system_flags) and
973 if args.avd_type == constants.TYPE_GF and args.remote_host is None and any(
980 def VerifyArgs(args): argument
995 if args.flavor and args.flavor not in constants.ALL_FLAVORS:
997 args.flavor, constants.ALL_FLAVORS)
999 if args.avd_type not in (constants.TYPE_CF, constants.TYPE_GF):
1000 if args.system_branch or args.system_build_id or args.system_build_target:
1003 % args.avd_type)
1005 if args.num > 1 and args.adb_port:
1009 if args.num > 1 and args.local_instance is not None:
1013 if args.local_instance is None and args.gpu == _DEFAULT_GPU:
1018 if args.adb_port:
1019 utils.CheckPortFree(args.adb_port)
1021 hw_properties = create_common.ParseKeyValuePairArgs(args.hw_property)
1028 cheeps_only_flags = [args.stable_cheeps_host_image_name,
1029 args.stable_cheeps_host_image_project,
1030 args.username,
1031 args.password,
1032 args.cheeps_betty_image,
1033 args.cheeps_features]
1034 if args.avd_type != constants.TYPE_CHEEPS and any(cheeps_only_flags):
1039 if (args.username or args.password) and not (args.username and args.password):
1041 if not args.autoconnect and args.unlock_screen:
1045 _VerifyGoldfishArgs(args)
1046 _VerifyLocalArgs(args)
1047 _VerifyHostArgs(args)