From 0b7ec3c3a4f7bc4c2312fbc1bdc7b85d63cb7038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E5=AD=9F=E5=85=83?= Date: Wed, 3 Jul 2024 07:16:44 +0000 Subject: [PATCH 1/2] =?UTF-8?q?update=20cases/smoke/basic/screenshot32/res?= =?UTF-8?q?ource/capturescreentest.py.=20=E5=BC=80=E5=90=AFapl=E5=92=8Cacl?= =?UTF-8?q?=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 贾孟元 --- .../resource/capturescreentest.py | 37 +++++++++++++------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/cases/smoke/basic/screenshot32/resource/capturescreentest.py b/cases/smoke/basic/screenshot32/resource/capturescreentest.py index 5123f63..2d32f3f 100644 --- a/cases/smoke/basic/screenshot32/resource/capturescreentest.py +++ b/cases/smoke/basic/screenshot32/resource/capturescreentest.py @@ -410,19 +410,32 @@ if __name__ == "__main__": if lose_process: print_to_log("SmokeTest: error: %s, These processes do not exist!!!" % lose_process) sys_exit() + + apl_check_main(args.device_num) + apl_compare = os.path.normpath(os.path.join(args.tools_path, 'APL_compare_03', 'apl_compare.log')) + try: + with open(apl_compare, mode='r', encoding='utf-8', errors='ignore') as compare_file: + compare_file.seek(0) + apl_result = compare_file.read() + except: + print_to_log('SmokeTest: error: apl_compare.log not exist') + if 'APL Check failed' in apl_result: + print_to_log('SmokeTest: error: apl check failed') + sys_exit() # - # acl_check_main(args.device_num) - # native_sa = os.path.normpath(os.path.join(args.tools_path, "acls_check", "native_sa.log")) - # try: - # with open(native_sa, mode='r', encoding='utf-8', errors='ignore') as native_file: - # native_file.seek(0) - # acl_result = native_file.read() - # native_file.close() - # except Exception as reason: - # print_to_log("SmokeTest: error: native_sa.log do not exist!") - # if "ACL check failed" in acl_result: - # print_to_log("SmokeTest: error: acl check failed") - # sys_exit() + + acl_check_main(args.device_num) + native_sa = os.path.normpath(os.path.join(args.tools_path, "acls_check", "native_sa.log")) + try: + with open(native_sa, mode='r', encoding='utf-8', errors='ignore') as native_file: + native_file.seek(0) + acl_result = native_file.read() + native_file.close() + except Exception as reason: + print_to_log("SmokeTest: error: native_sa.log do not exist!") + if "ACL check failed" in acl_result: + print_to_log("SmokeTest: error: acl check failed") + sys_exit() try: args.test_num.index('/') -- Gitee From 44558b678779b1ed055fadeb86a339adc8f49477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E5=AD=9F=E5=85=83?= Date: Wed, 3 Jul 2024 09:42:05 +0000 Subject: [PATCH 2/2] update cases/smoke/basic/screenshot32/resource/capturescreentest.py. os.path.dirname MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 贾孟元 --- cases/smoke/basic/screenshot32/resource/capturescreentest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cases/smoke/basic/screenshot32/resource/capturescreentest.py b/cases/smoke/basic/screenshot32/resource/capturescreentest.py index 2d32f3f..fbab9b8 100644 --- a/cases/smoke/basic/screenshot32/resource/capturescreentest.py +++ b/cases/smoke/basic/screenshot32/resource/capturescreentest.py @@ -412,7 +412,7 @@ if __name__ == "__main__": sys_exit() apl_check_main(args.device_num) - apl_compare = os.path.normpath(os.path.join(args.tools_path, 'APL_compare_03', 'apl_compare.log')) + apl_compare = os.path.normpath(os.path.join(os.path.dirname(args.tools_path), 'APL_compare_03', 'apl_compare.log')) try: with open(apl_compare, mode='r', encoding='utf-8', errors='ignore') as compare_file: compare_file.seek(0) -- Gitee