From e4844426c8bb7b6d019ffe9d9ffc9b66b60ec911 Mon Sep 17 00:00:00 2001 From: redjie Date: Mon, 17 Jul 2023 11:19:04 +0800 Subject: [PATCH] power wakeup test retry Signed-off-by: redjie Change-Id: I6a7988a0f5271e5eed19c9a3737f31b8a7375cef --- .../basic/screenshot32/resource/capturescreentest.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cases/smoke/basic/screenshot32/resource/capturescreentest.py b/cases/smoke/basic/screenshot32/resource/capturescreentest.py index 9dd68e76..90281b1a 100644 --- a/cases/smoke/basic/screenshot32/resource/capturescreentest.py +++ b/cases/smoke/basic/screenshot32/resource/capturescreentest.py @@ -350,7 +350,10 @@ if __name__ == "__main__": file_from_dev("/data/log/hilog/system_start_log_{}.tar".format(args.device_num), args.save_path) connect_check() launcher_similarity = shot_and_cmp("launcher.jpeg") - if launcher_similarity >= 90: + power_state = enter_shell_cmd("hidumper -s 3308", WAIT_TIME_ONE) + if "State=2" not in power_state: + print_to_log("SmokeTest:: ERROR, DISPLAY POWER MANAGER DUMP State ≠ 2") + if launcher_similarity >= 90 and "State=2" in power_state: print_to_log("SmokeTest:: launcher screenshot comparison is ok!") break elif reboot_cnt >= 1: @@ -393,11 +396,6 @@ if __name__ == "__main__": else: print_to_log("SmokeTest:: first processes check is ok") - power_state = enter_shell_cmd("hidumper -s 3308", WAIT_TIME_ONE) - if "State=2" not in power_state: - print_to_log("SmokeTest:: DISPLAY POWER MANAGER DUMP State=0") - sys_exit() - main(args.device_num) native_sa = os.path.normpath(os.path.join(args.tools_path, "acls_check", "native_sa.log")) try: