add patch json

Signed-off-by: w00661648 <vi.wangwei@huawei.com>
This commit is contained in:
w00661648
2023-08-19 11:25:11 +08:00
parent c55a04b2c9
commit 9b9cc7e27c
15 changed files with 129 additions and 11 deletions
+1 -1
View File
@@ -33,7 +33,7 @@
"common_event_service",
"distributeddatamgr",
"eventhandler",
"hiviewdfx_hilog_native",
"hilog",
"ipc",
"napi",
"permission_standard",
+1 -1
View File
@@ -45,7 +45,7 @@ ohos_shared_library("erms_client") {
"common_event_service:cesfwk_innerkits",
"c_utils:utils",
"eventhandler:libeventhandler",
"hiviewdfx_hilog_native:libhilog",
"hilog:libhilog",
"ipc:ipc_core",
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
+1 -1
View File
@@ -49,7 +49,7 @@ ohos_shared_library("ecologicalrulemgrservice") {
"ability_runtime:wantagent_innerkits",
"ability_runtime:abilitykit_native",
"c_utils:utils",
"hiviewdfx_hilog_native:libhilog",
"hilog:libhilog",
"ipc:ipc_core",
"napi:ace_napi"
]
+7
View File
@@ -0,0 +1,7 @@
{
"patches": [{
"project": "productdefine_common",
"path": "productdefine/common",
"pr_url": "https://gitee.com/openharmony/productdefine_common/pulls/692"
}]
}
+1 -1
View File
@@ -75,7 +75,7 @@ ohos_shared_library("ecologicalrulemgr_service") {
"bundle_framework:appexecfwk_base",
"bundle_framework:appexecfwk_core",
"c_utils:utils",
"hiviewdfx_hilog_native:libhilog",
"hilog:libhilog",
"ipc:ipc_core",
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
@@ -120,8 +120,7 @@ int32_t EcologicalRuleEngineCache::GetMapItem(nlohmann::json *&inputJson, const
int32_t EcologicalRuleEngineCache::RefreshAppEnhanceData(const int32_t operType, const std::string &appData)
{
LOG_INFO("refresh enhance success, operType = %{public}d, appData.length = %{public}lu", operType,
appData.length());
LOG_INFO("refresh enhance success, operType = %{public}d", operType);
return 0;
}
@@ -387,8 +386,6 @@ void EcologicalRuleEngineCache::ClearSceneCodeCache()
std::list<struct SceneCodeValue> &sceneCodeList = iter->second;
for (auto iterList = sceneCodeList.begin(); iterList != sceneCodeList.end();) {
if (iterList->timestamp + EngineCacheConstants::TIMER_INTERVAL_60MIN_MS < curTime) {
LOG_DEBUG("erase scene_code,bundle:%{public}s,sceneCode:%{public}s,timestamp:%{public}lu",
iter->first.c_str(), iterList->sceneCode.c_str(), iterList->timestamp);
sceneCodeList.erase(iterList++);
} else {
iterList++;
@@ -470,7 +470,6 @@ int32_t EcologicalRuleCalculatorImpl::ConstructRuleStrategyObjects()
} catch (...) {
LOG_ERROR("fail: catch exception.");
}
LOG_INFO("finish! ruleStrategyObjects size is %{public}lu", ruleStrategyObjects.size());
ReleaseRuleStrategyObjectLock();
return SUCCESS_RULE;
}
View File
@@ -0,0 +1,89 @@
# Copyright (c) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#####################hydra-fuzz###################
import("//build/config/features.gni")
import("//build/test.gni")
import("//foundation/bundlemanager/ecological_rule_mgr/ecologicalrulemgrservice.gni")
module_output_path = "ecological_rule_mgr/stubFuzzTest"
##############################fuzztest##########################################
ohos_fuzztest("EcologicalRuleMgrServiceStubFuzzTest") { # 定义测试套名称ShareManagerSrvStubFuzzTest
module_out_path = "HuaweiShare/iShare"
fuzz_config_file = "${share_root_path}/test/fuzztest/ecologicalrulemgrservicestub_fuzzer" # Fuzz组套路径
include_dirs = [
"../../services/manager/include",
"../../services/ruleengine/include",
"../../services/enginecache/include",
"include",
"${innerkits_path}/include",
"//utils/system/safwk/native/include",
"//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
"//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_core/include",
"//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include",
"//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [
"EcologicalRileMgrServiceStubFuzzer.cpp", # Fuzz用例文件
]
deps = [
"ability_base:want",
"ability_base:zuri",
"ability_runtime:abilitykit_native",
"ability_runtime:runtime",
"ability_runtime:wantagent_innerkits",
"bundle_framework:appexecfwk_base",
"bundle_framework:appexecfwk_core",
"common_event_service:cesfwk_innerkits",
"common_event_service:cesfwk_innerkits",
"c_utils:utils",
"hilog:libhilog",
"ipc:ipc_core",
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
"access_token:libaccesstoken_sdk",
"access_token:libtokenid_sdk",
"access_token:libnativetoken",
"access_token:libtoken_setproc",
]
external_deps = [
"c_utils:utils",
"device_manager:devicemanagersdk",
"graphic_2d:surface",
"hilog:libhilog",
"input:libmmi-client",
"ipc:ipc_core",
"safwk:system_ability_fwk",
]
}
###############################################################################
group("fuzztest") { # [Group]引用Fuzz测试套
testonly = true
deps = []
deps += [
":EcologicalRuleMgrServiceStubFuzzTest",
]
}
###############################################################################
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2023 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<fuzz_config>
<fuzztest>
<!-- maximum length of a test input -->
<max_len>1000</max_len>
<!-- maximum total time in seconds to run the fuzzer -->
<max_total_time>300</max_total_time>
<!-- memory usage limit in Mb -->
<rss_limit_mb>4096</rss_limit_mb>
</fuzztest>
</fuzz_config>
+1 -1
View File
@@ -57,7 +57,7 @@ ohos_unittest("EcologicalRuleMgrServiceClientTest") {
"common_event_service:cesfwk_innerkits",
"common_event_service:cesfwk_innerkits",
"c_utils:utils",
"hiviewdfx_hilog_native:libhilog",
"hilog:libhilog",
"ipc:ipc_core",
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
+1 -1
View File
@@ -29,7 +29,7 @@ ohos_source_set("ecologicalrulemgrservice_utils") {
]
external_deps = [
"hiviewdfx_hilog_native:libhilog",
"hilog:libhilog",
]
part_name = "ecological_rule_mgr"