Lines Matching full:args
54 def get_command_and_env_path(args: object) -> [str, str]:
55 """get command and environment path from args for running excutable."""
56 env_path_list = list(set(get_env_path_from_rsp(args.script_file)))
57 env_path_list.append(args.clang_lib_path)
59 if args.qemu_binary_path:
60 if not os.path.exists(args.qemu_binary_path):
69 "{}".format(args.qemu_binary_path) + \
70 " -L {}".format(args.qemu_ld_prefix) + \
72 " {}".format(args.script_file)
74 cmd = "{}".format(args.script_file)
75 cmd += " {}".format(args.script_options) if args.script_options else ""
76 cmd += " {}".format(args.script_args) if args.script_args else ""
85 parser.add_argument('--script-args', help='args of script')
94 args = parser.parse_args()
95 return args
98 def process_open(args: object) -> [str, object]:
100 if args.env_path:
102 cmd = args.script_file
103 cmd += " {}".format(args.script_options) if args.script_options else ""
104 cmd += " {}".format(args.script_args) if args.script_args else ""
107 env={'LD_LIBRARY_PATH': str(args.env_path)})
110 [cmd, env_path] = get_command_and_env_path(args)
111 if args.qemu_binary_path:
121 def judge_output(args: object):
124 [cmd, subp] = process_open(args)
125 timeout_limit = int(args.timeout_limit) if args.timeout_limit else 1200 # units: s
135 if args.expect_output:
136 if returncode != args.expect_output:
143 print(">>>>> Expect return: [" + args.expect_output \
146 elif args.expect_sub_output:
148 if out_str.find(args.expect_sub_output) == -1 or returncode != "0":
153 print(">>>>> Expect contain: [" + args.expect_sub_output \
156 elif args.expect_file:
157 with open(args.expect_file, mode='r') as file: