Lines Matching refs:args
55 def get_command_and_env_path(args: object) -> [str, str]:
56 """get command and environment path from args for running excutable."""
57 env_path_list = list(set(get_env_path_from_rsp(args.script_file)))
58 env_path_list.append(args.clang_lib_path)
60 if args.qemu_binary_path:
61 if not os.path.exists(args.qemu_binary_path):
70 "{}".format(args.qemu_binary_path) + \
71 " -L {}".format(args.qemu_ld_prefix) + \
73 " {}".format(args.script_file)
75 cmd = "{}".format(args.script_file)
76 cmd += " {}".format(args.script_options) if args.script_options else ""
77 cmd += " {}".format(args.script_args) if args.script_args else ""
86 parser.add_argument('--script-args', help='args of script')
95 args = parser.parse_args()
96 return args
99 def process_open(args: object) -> [str, object]:
101 if args.env_path:
103 cmd = args.script_file
104 cmd += " {}".format(args.script_options) if args.script_options else ""
105 cmd += " {}".format(args.script_args) if args.script_args else ""
108 env={'LD_LIBRARY_PATH': str(args.env_path)})
111 [cmd, env_path] = get_command_and_env_path(args)
112 if args.qemu_binary_path:
134 def judge_output(args: object):
137 [cmd, subp] = process_open(args)
138 timeout_limit = int(args.timeout_limit) if args.timeout_limit else 1200 # units: s
149 if args.expect_output:
150 if returncode != args.expect_output:
157 print(">>>>> Expect return: [" + args.expect_output \
160 elif args.expect_sub_output:
161 if out_str.find(args.expect_sub_output) == -1 or returncode != "0":
166 print(">>>>> Expect contain: [" + args.expect_sub_output \
169 elif args.expect_file:
170 with open(args.expect_file, mode='r') as file: