提交 a7f28e4b 编写于 作者: L lnlan

重试5次

Signed-off-by: Nlnlan <lanleinan3@huawei.com>
上级 9fd1ed02
......@@ -14,7 +14,7 @@
{
"app_name": "launcher",
"entry": "",
"rm_lock_cmd":["hdc_std shell \"uinput -T -m 350 900 350 300;sleep 2;uinput -T -m 350 300 350 900\""],
"rm_lock_cmd":["hdc_std shell \"uinput -T -m 425 1000 425 400;sleep 2;uinput -T -m 425 400 425 1000\""],
"powermode_cmd":["hdc_std shell \"power-shell wakeup && power-shell setmode 602\""],
"all_actions": [
[2, "rm_lock_cmd"], [2, "powermode_cmd"], [2, "rm_lock_cmd"], [2, "powermode_cmd"],
......@@ -77,7 +77,7 @@
"first_pic-x-y":[100, 250], "pic_del1-x-y":[500, 1165], "pic_del2-x-y":[445, 1150],
"all_actions": [
[1, "close_auto_log"], [1, "open_camera_log"], [5, "start_camera"], [2, "permisson_ok-x-y"], [2, "permisson_ok-x-y"], [2, "permisson_ok-x-y"], [2, "permisson_ok-x-y"], [2, "permisson_ok-x-y"], [2, "permisson_ok-x-y"], [2, "recover_log"], [3, "check_result"],
[2, "recent-x-y"], [2, "recent_del-x-y"], [2, "compress_log"], [2, "recv_log-file", "/data/log/hilog/camera_log.tar"]
[2, "shot_cmd"], [2, "recent-x-y"], [2, "recent_del-x-y"], [2, "compress_log"], [2, "recv_log-file", "/data/log/hilog/camera_log.tar"]
]
},
{
......@@ -92,13 +92,13 @@
{
"app_name": "photos",
"entry": "aa start -a com.ohos.photos.MainAbility -b com.ohos.photos",
"all_actions": [[2, "permisson_ok-x-y"], [2, "permisson_ok-x-y"], [2, "permisson_ok-x-y"], [2, "shot_cmd"], [2, "recent-x-y"], [2, "recent_del-x-y"], [2, "cmp_cmd-level"], [2, "recent-x-y"], [2, "recent_del-x-y"]]
"all_actions": [[2, "permisson_ok-x-y"], [2, "permisson_ok-x-y"], [2, "permisson_ok-x-y"], [2, "shot_cmd"], [2, "recent-x-y"], [2, "recent_del-x-y"], [2, "cmp_cmd-level", 200000], [2, "recent-x-y"], [2, "recent_del-x-y"]]
},
{
"app_name": "distributedcalc",
"entry": "aa start -a com.example.distributedcalc.default -b com.example.distributedcalc",
"compress_log":["hdc_std shell \"cd /data/log/hilog && tar -cf calc_log.tar *\""],
"all_actions": [[2, "permisson_ok-x-y"], [2, "permisson_ok-x-y"], [2, "shot_cmd"], [2, "recent-x-y"], [2, "recent_del-x-y"], [2, "cmp_cmd-level", 3686400], [2, "recent-x-y"], [2, "recent_del-x-y"], [2, "stop_hilog"], [2, "compress_log"], [2, "recv_log-file", "/data/log/hilog/calc_log.tar"]]
"all_actions": [[2, "permisson_ok-x-y"], [2, "permisson_ok-x-y"], [2, "shot_cmd"], [2, "recent-x-y"], [2, "recent_del-x-y"], [2, "cmp_cmd-level", 200000], [2, "recent-x-y"], [2, "recent_del-x-y"], [2, "stop_hilog"], [2, "compress_log"], [2, "recv_log-file", "/data/log/hilog/calc_log.tar"]]
},
{
"app_name": "note",
......
......@@ -135,6 +135,7 @@ if __name__ == "__main__":
idx_list = args.test_num
fail_idx_list = []
fail_name_list = []
for idx in idx_list:
single_app = all_app[idx]
sys.stdout.flush()
......@@ -147,10 +148,10 @@ if __name__ == "__main__":
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.close()
testcnt = 2
testcnt = 5
while testcnt:
testok = 0
if testcnt == 1:
if testcnt != 5:
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")
......@@ -230,12 +231,20 @@ if __name__ == "__main__":
EnterCmd(next_cmd, single_action[0])
if fail_idx_list.count(idx):
fail_idx_list.remove(idx)
if fail_name_list.count(single_app['app_name']):
fail_name_list.remove(single_app['app_name'])
if testok == 1:
MyPrint("testcase {}, {} is ok!\n\n".format(idx, single_app['app_name']))
testcnt = 0
elif testok == -1:
MyPrint("ERROR:testcase {}, {} is failed!\n\n".format(idx, single_app['app_name']))
fail_idx_list.append(idx)
fail_name_list.append(single_app['app_name'])
if testcnt == 1 and single_app['app_name'] == 'launcher':
MyPrint("ERROR: name {}, index {}, these testcase is failed".format(fail_name_list, fail_idx_list))
MyPrint("End of check, test failed!")
sys.stdout.flush()
sys.exit(len(fail_idx_list))
testcnt -= 1
else:
testcnt = 0
......
screenshot/resource/photos.png

62.5 KB | W: | H:

screenshot/resource/photos.png

74.9 KB | W: | H:

screenshot/resource/photos.png
screenshot/resource/photos.png
screenshot/resource/photos.png
screenshot/resource/photos.png
  • 2-up
  • Swipe
  • Onion skin
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册