From 8cf8b2412fb6dba5a9bcc456cbb62f123c70d789 Mon Sep 17 00:00:00 2001 From: "zhangyafei.echo" Date: Tue, 13 Sep 2022 17:20:00 +0800 Subject: [PATCH 1/6] IssueNo:#I5QUHS Description:Add syscap defination to "SystemCapability.Ability.AbilityRuntime.QuickFix" Sig:SIG_ApplicationFramework Feature or BugFix: Feature Binary Source: No Signed-off-by: zhangyafei.echo Change-Id: I64f6c79ccfaee0767cf82db165b6980b6c531b8f --- 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 fe509786d7c938a21fa48fc6ec050e26124e3b8b Mon Sep 17 00:00:00 2001 From: ry Date: Wed, 14 Sep 2022 18:21:16 +0800 Subject: [PATCH 2/6] modify code path Signed-off-by: ry --- 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 From 579b4218b2f909062622df1136dfd275974735f1 Mon Sep 17 00:00:00 2001 From: aodongbiao Date: Fri, 23 Sep 2022 11:38:29 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: aodongbiao Change-Id: I70656958f0189843e04bc20465c07b4025003259 --- tools/syscap_check.py | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/tools/syscap_check.py b/tools/syscap_check.py index 99c550d..a4932aa 100644 --- a/tools/syscap_check.py +++ b/tools/syscap_check.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,9 +18,6 @@ import json import re import argparse from prettytable import PrettyTable, ALL -import sys - -debug = True if sys.gettrace() else False def get_args(): @@ -83,14 +80,10 @@ def read_value_from_json(filepath: str, return f = open(filepath, 'r') data = json.load(f) - if debug: - print(filepath) for key in key_hierarchy: try: data = data[key] except KeyError: - if debug: - print('warning: can\'t find the key:"{}" in file "{}"'.format(key, filepath)) return finally: f.close() @@ -114,7 +107,7 @@ def collect_syscap_from_codec(filepath: str, pattern: str = r'{"(.*)"') -> tuple array_syscap_set.update(re.findall(ptrn, content)) array_syscap_dict[filepath] = list() for v in array_syscap_set: - array_syscap_dict[filepath].append(v) + array_syscap_dict.get(filepath).append(v) return array_syscap_set, array_syscap_dict @@ -311,16 +304,6 @@ def main(): bundle_key_heirarchy=bundle_syscap_heirarchy, bundles=bundles) -def test(): - h_path = "./bundle.json" - key_heirarchy = ("component", "syscap") - result_dict = dict() - read_value_from_json(h_path, key_heirarchy, result_dict, bundle_syscap_post_handler) - print(result_dict) - print(len(result_dict)) - - if __name__ == "__main__": main() - # test() -- Gitee From e1dfdf80726022a18d05e7306e6edf60de54788b Mon Sep 17 00:00:00 2001 From: aodongbiao Date: Fri, 23 Sep 2022 03:45:08 +0000 Subject: [PATCH 4/6] update include/syscap_define.h. Signed-off-by: aodongbiao --- include/syscap_define.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/syscap_define.h b/include/syscap_define.h index 42b3b1a..8901cd2 100644 --- a/include/syscap_define.h +++ b/include/syscap_define.h @@ -246,7 +246,6 @@ typedef enum SystemCapabilityNum { SECURITY_CRYPTOFRAMEWORK, // Add here MULTIMODALINPUT_INPUT_COOPERATOR, - ABILITY_ABILITYRUNTIME_QUICKFIX, SYSCAP_NUM_MAX = 960 } SyscapNum; -- Gitee From 8d7bae22e796870722369a75991d870c6c0e78b8 Mon Sep 17 00:00:00 2001 From: aodongbiao Date: Fri, 23 Sep 2022 03:47:01 +0000 Subject: [PATCH 5/6] update include/syscap_define.h. Signed-off-by: aodongbiao --- include/syscap_define.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/syscap_define.h b/include/syscap_define.h index 8901cd2..c894149 100644 --- a/include/syscap_define.h +++ b/include/syscap_define.h @@ -469,7 +469,6 @@ 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 dc7dd82ff97109fc2299950f189bf9c34a4d9a9c Mon Sep 17 00:00:00 2001 From: aodongbiao Date: Fri, 23 Sep 2022 04:29:23 +0000 Subject: [PATCH 6/6] 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 aa33c11..15937b3 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/testfwk/developer_test/third_party/lib/cpp:gtest_main", + "//test/developertest/third_party/lib/cpp:gtest_main", "//third_party/bounds_checking_function:libsec_static", ] -- Gitee