Lines Matching refs:task

144 def move_picture(task, image_name):
149 pic_save_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), f'pictures/{task.name}')
160 def get_running_screenshot(task, image_name, is_debug, module=''):
161 logging.debug(f'Getting runtime screenshot of {task.name}')
166 module_path = get_module_path(task, module)
167 output_path_signed = get_output_path(task, module, options.OutputType.signed)
168 build_path = os.path.join(task.path, *module_path, *task.build_path)
175 hsp_output_path = task.backup_info.hsp_signed_output_debug if is_debug \
176 else task.backup_info.hsp_signed_output_release
181 external_hsp_output_path = task.backup_info.external_hsp_signed_output_debug if is_debug \
182 else task.backup_info.external_hsp_signed_output_release
189 run_cmd(['hdc', 'shell', 'aa', 'start', '-a', f'{task.ability_name}', '-b', f'{task.bundle_name}'])
197 run_cmd(['hdc', 'shell', 'aa', 'force-stop', f'{task.bundle_name}'])
198 run_cmd(['hdc', 'shell', 'bm', 'uninstall', '-n', f'{task.bundle_name}'])
200 move_picture(task, image_name)
233 def verify_runtime(task, picture_name):
235 f'pictures/{task.name}/{picture_name}.jpeg')
237 f'pictures_reference/{task.name}/{picture_name}.jpeg')
240 logging.error(f'{task.name} get error when running')
290 def get_module_name(task, module=''):
292 'Hap': task.hap_module,
293 'Har': task.har_module,
294 'BytecodeHar': task.har_module,
295 'Hsp': task.hsp_module,
296 'Cpp': task.cpp_module
302 def get_module_path(task, module=''):
304 'Hap': task.hap_module_path,
305 'Har': task.har_module_path,
306 'BytecodeHar': task.har_module_path,
307 'Hsp': task.hsp_module_path,
308 'Cpp': task.cpp_module_path
314 def get_output_path_unsigned(task, module=''):
316 "Hap": task.hap_output_path,
317 "Hsp": task.hsp_output_path,
318 "Cpp": task.cpp_output_path
323 def get_output_path_signed(task, module=''):
325 "Hap": task.hap_output_path_signed,
326 "Hsp": task.hsp_output_path_signed,
327 "Cpp": task.cpp_output_path_signed
332 def get_output_path_har(task, module=''):
334 "Har": task.har_output_path_har,
335 "BytecodeHar": task.har_output_path_har,
336 "Hsp": task.hsp_output_path_har
341 def get_output_path(task, module, output_type):
343 return get_output_path_unsigned(task, module)
345 return get_output_path_signed(task, module)
347 return get_output_path_har(task, module)