From 45e824f5e701962e20c2f2ef6643f1c2b0123fa0 Mon Sep 17 00:00:00 2001 From: aodongbiao Date: Mon, 26 Sep 2022 12:56:05 +0800 Subject: [PATCH 1/3] change open to with open Signed-off-by: aodongbiao Change-Id: I9d2f6ad94180ed79778228679d386e0d03f89fef --- tools/syscap_check.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/syscap_check.py b/tools/syscap_check.py index a4932aa..e2b97fa 100644 --- a/tools/syscap_check.py +++ b/tools/syscap_check.py @@ -78,15 +78,15 @@ def read_value_from_json(filepath: str, if not os.path.isfile(filepath): print('error: "{}" is not a file.') return - f = open(filepath, 'r') - data = json.load(f) - for key in key_hierarchy: - try: - data = data[key] - except KeyError: - return - finally: - f.close() + with open(filepath, 'r', encoding='utf-8') as f: + data = json.load(f) + for key in key_hierarchy: + try: + data = data[key] + except KeyError: + return + finally: + pass data = [post_handler(x) for x in data if len(x) != 0 and not x.isspace()] if len(data) != 0: result_dict[filepath] = data -- Gitee From eaf8bd374daa8f92378042a0e26388181b621616 Mon Sep 17 00:00:00 2001 From: aodongbiao Date: Mon, 26 Sep 2022 06:26:14 +0000 Subject: [PATCH 2/3] update include/syscap_define.h. Signed-off-by: aodongbiao --- include/syscap_define.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/syscap_define.h b/include/syscap_define.h index c894149..42b3b1a 100644 --- a/include/syscap_define.h +++ b/include/syscap_define.h @@ -246,6 +246,7 @@ typedef enum SystemCapabilityNum { SECURITY_CRYPTOFRAMEWORK, // Add here MULTIMODALINPUT_INPUT_COOPERATOR, + ABILITY_ABILITYRUNTIME_QUICKFIX, SYSCAP_NUM_MAX = 960 } SyscapNum; @@ -469,6 +470,7 @@ const static SyscapWithNum g_arraySyscap[] = { {"SystemCapability.Security.SecurityGuard", SECURITY_SECURITYGUARD}, {"SystemCapability.Security.CryptoFramework", SECURITY_CRYPTOFRAMEWORK}, {"SystemCapability.MultimodalInput.Input.Cooperator", MULTIMODALINPUT_INPUT_COOPERATOR}, + {"SystemCapability.Ability.AbilityRuntime.QuickFix", ABILITY_ABILITYRUNTIME_QUICKFIX}, }; #ifdef __cplusplus -- Gitee From e617d298544a3c8c4bb67e45d83628442c7d1a0b Mon Sep 17 00:00:00 2001 From: aodongbiao Date: Mon, 26 Sep 2022 06:27:36 +0000 Subject: [PATCH 3/3] update test/unittest/common/BUILD.gn. Signed-off-by: aodongbiao --- test/unittest/common/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unittest/common/BUILD.gn b/test/unittest/common/BUILD.gn index 15937b3..aa33c11 100644 --- a/test/unittest/common/BUILD.gn +++ b/test/unittest/common/BUILD.gn @@ -44,7 +44,7 @@ if (defined(ohos_lite)) { deps = [ "//base//hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", - "//test/developertest/third_party/lib/cpp:gtest_main", + "//test/testfwk/developer_test/third_party/lib/cpp:gtest_main", "//third_party/bounds_checking_function:libsec_static", ] -- Gitee