提交 dc1eac0a 编写于 作者: L lnlan

完善失败重试功能

Signed-off-by: Nlnlan <lanleinan3@huawei.com>
上级 2c6b8898
...@@ -140,14 +140,17 @@ if __name__ == "__main__": ...@@ -140,14 +140,17 @@ if __name__ == "__main__":
with open(os.path.join(args.save_path, 'shot_test.bat'), mode='a', encoding='utf-8') as cmd_file: with open(os.path.join(args.save_path, 'shot_test.bat'), mode='a', encoding='utf-8') as cmd_file:
cmd_file.write("\n\n::::::case {} --- {} test start \n".format(idx, single_app['app_name'])) cmd_file.write("\n\n::::::case {} --- {} test start \n".format(idx, single_app['app_name']))
cmd_file.close() cmd_file.close()
if single_app['entry'] != "":
EnterCmd(call_app_cmd, 5)
MyPrint(single_app['all_actions'])
testcnt = 2 testcnt = 2
while testcnt: while testcnt:
testok = 0 testok = 0
if testcnt == 1: if testcnt == 1:
MyPrint(">>>>>>>>>>>>>>>>>>>>>>>Try again:\n") MyPrint(">>>>>>>>>>>>>>>>>>>>>>>Try again:\n")
with open(os.path.join(args.save_path, 'shot_test.bat'), mode='a', encoding='utf-8') as cmd_file:
cmd_file.write("\n::::::Last failed, Try again \n")
cmd_file.close()
if single_app['entry'] != "":
EnterCmd(call_app_cmd, 5)
MyPrint(single_app['all_actions'])
for single_action in single_app['all_actions']: for single_action in single_app['all_actions']:
#shot_cmd is stable, different to other cmd,so handle it specialy #shot_cmd is stable, different to other cmd,so handle it specialy
if type(single_action[1]) == str and single_action[1] == 'shot_cmd': if type(single_action[1]) == str and single_action[1] == 'shot_cmd':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册