mirror of
https://gitee.com/openharmony/appexecfwk_standard
synced 2024-11-27 07:00:31 +00:00
commit
3310dcb69f
@ -19,9 +19,6 @@ config("bundlemgr_test_config") {
|
||||
"${innerkits_path}/appexecfwk_core/include/bundlemgr",
|
||||
"${appexecfwk_path}/services/bundlemgr/include/sandbox_app",
|
||||
"mock/include",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/want/include/ohos/aafwk/content/",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/base/include",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/uri/include",
|
||||
]
|
||||
|
||||
if (bundle_framework_free_install) {
|
||||
|
@ -57,7 +57,6 @@ ohos_unittest("BmsBundleCloneTest") {
|
||||
|
||||
configs = [
|
||||
"${services_path}/bundlemgr/test:bundlemgr_test_config",
|
||||
"${libs_path}/libeventhandler:libeventhandler_config",
|
||||
"${innerkits_path}/appexecfwk_base:appexecfwk_base_sdk_config",
|
||||
]
|
||||
cflags = []
|
||||
@ -65,17 +64,6 @@ ohos_unittest("BmsBundleCloneTest") {
|
||||
cflags += [ "-DBINDER_IPC_32BIT" ]
|
||||
}
|
||||
deps = [
|
||||
"${innerkits_path}/appexecfwk_base:appexecfwk_base",
|
||||
"${innerkits_path}/appexecfwk_core:appexecfwk_core",
|
||||
"${libs_path}/libeventhandler:libeventhandler_target",
|
||||
"//base/security/appverify/interfaces/innerkits/appverify:libhapverify",
|
||||
"//base/security/permission/interfaces/innerkits/permission_standard/permissionsdk:libpermissionsdk_standard",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/ability_manager:ability_manager",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/base:base",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/want:want",
|
||||
"//foundation/distributeddatamgr/distributeddatamgr/interfaces/innerkits/distributeddata:distributeddata_inner",
|
||||
"//foundation/distributedschedule/safwk/interfaces/innerkits/safwk:system_ability_fwk",
|
||||
"//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy",
|
||||
"//third_party/googletest:gtest_main",
|
||||
"//third_party/jsoncpp:jsoncpp",
|
||||
]
|
||||
|
@ -24,10 +24,7 @@ module_output_path = "bundle_framework/bundlemgrservice"
|
||||
ohos_unittest("BmsDataMgrTest") {
|
||||
use_exceptions = true
|
||||
module_out_path = module_output_path
|
||||
include_dirs = [
|
||||
"${aafwk_path}/interfaces/innerkits/want/include/ohos/aafwk/content",
|
||||
"//third_party/jsoncpp/include",
|
||||
]
|
||||
include_dirs = [ "//third_party/jsoncpp/include" ]
|
||||
sources = [
|
||||
"${services_path}/bundlemgr/src/account_helper.cpp",
|
||||
"${services_path}/bundlemgr/src/bundle_clone_mgr.cpp",
|
||||
@ -44,7 +41,6 @@ ohos_unittest("BmsDataMgrTest") {
|
||||
"${services_path}/bundlemgr/src/kvstore_death_recipient_callback.cpp",
|
||||
"${services_path}/bundlemgr/src/permission_changed_death_recipient.cpp",
|
||||
"${services_path}/bundlemgr/src/preinstall_data_storage.cpp",
|
||||
"//foundation/aafwk/standard/frameworks/kits/content/cpp/src/ohos/aafwk/content/element_name.cpp",
|
||||
]
|
||||
|
||||
sources += [
|
||||
|
@ -14,14 +14,7 @@
|
||||
import("../../../../../appexecfwk.gni")
|
||||
|
||||
config("bms_module_test_config") {
|
||||
include_dirs = [
|
||||
"mock/include",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/want/include/ohos/aafwk/content/",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/base/include",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/ability_manager/include",
|
||||
"//foundation/aafwk/standard/services/abilitymgr/include",
|
||||
"//foundation/aafwk/standard/services/common/include",
|
||||
]
|
||||
include_dirs = [ "mock/include" ]
|
||||
|
||||
configs = [ "${services_path}/bundlemgr:bundlemgr_common_config" ]
|
||||
}
|
||||
|
@ -18,7 +18,6 @@ module_output_path = "bundle_framework/benchmark/bundle_framework"
|
||||
|
||||
ohos_benchmarktest("BenchmarkTestInstallerProxy") {
|
||||
module_out_path = module_output_path
|
||||
include_dirs = [ "//foundation/aafwk/standard/interfaces/innerkits/want/include/ohos/aafwk/content/" ]
|
||||
|
||||
sources = [ "installer_proxy_test.cpp" ]
|
||||
|
||||
|
@ -36,11 +36,11 @@ ohos_fuzztest("ParseSysCapFuzzTest") {
|
||||
"${common_path}:libappexecfwk_common",
|
||||
"${services_path}/bundlemgr:bundle_parser",
|
||||
"${services_path}/bundlemgr:parser_common",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/base:base",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/want:want",
|
||||
"//third_party/googletest:gtest_main",
|
||||
]
|
||||
external_deps = [
|
||||
"ability_base:base",
|
||||
"ability_base:want",
|
||||
"bundle_framework:appexecfwk_base",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
|
@ -36,11 +36,11 @@ ohos_fuzztest("ParseFuzzTest") {
|
||||
"${common_path}:libappexecfwk_common",
|
||||
"${services_path}/bundlemgr:bundle_parser",
|
||||
"${services_path}/bundlemgr:parser_common",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/base:base",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/want:want",
|
||||
"//third_party/googletest:gtest_main",
|
||||
]
|
||||
external_deps = [
|
||||
"ability_base:base",
|
||||
"ability_base:want",
|
||||
"bundle_framework:appexecfwk_base",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
|
@ -30,7 +30,6 @@ ohos_source_set("bms_install_sst_source") {
|
||||
testonly = true
|
||||
|
||||
sources = [
|
||||
"${aafwk_path}/frameworks/kits/content/cpp/src/ohos/aafwk/content/element_name.cpp",
|
||||
"${innerkits_path}/appexecfwk_base/src/ability_info.cpp",
|
||||
"${innerkits_path}/appexecfwk_base/src/application_info.cpp",
|
||||
"${innerkits_path}/appexecfwk_base/src/bundle_info.cpp",
|
||||
@ -40,10 +39,7 @@ ohos_source_set("bms_install_sst_source") {
|
||||
"${innerkits_path}/appexecfwk_core/src/bundlemgr/status_receiver_proxy.cpp",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
"${aafwk_path}/interfaces/innerkits/want/include/ohos/aafwk/content",
|
||||
"//third_party/json/include",
|
||||
]
|
||||
include_dirs = [ "//third_party/json/include" ]
|
||||
|
||||
public_configs = [ ":bms_system_test_config" ]
|
||||
|
||||
@ -56,15 +52,15 @@ ohos_source_set("bms_install_sst_source") {
|
||||
cflags += [ "-DBINDER_IPC_32BIT" ]
|
||||
}
|
||||
deps = [
|
||||
"${innerkits_path}/appexecfwk_core:appexecfwk_core",
|
||||
"${services_path}/test/moduletest/utils:tool_common",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/base:base",
|
||||
"//foundation/aafwk/standard/interfaces/innerkits/want:want",
|
||||
"//third_party/googletest:gtest_main",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
"ability_base:base",
|
||||
"ability_base:want",
|
||||
"bundle_framework:appexecfwk_core",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
]
|
||||
|
@ -18,10 +18,7 @@ module_output_path = "bundle_framework/bundlemgrsst"
|
||||
|
||||
ohos_systemtest("ActsBmsKitSystemTest") {
|
||||
module_out_path = module_output_path
|
||||
include_dirs = [
|
||||
"//third_party/json/include",
|
||||
"//base/notification/common_event_service/test/systemtest/common/resource",
|
||||
]
|
||||
include_dirs = [ "//third_party/json/include" ]
|
||||
|
||||
sources = [ "acts_bms_kit_system_test.cpp" ]
|
||||
cflags = []
|
||||
|
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2021 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.
|
||||
*/
|
||||
#ifndef TEST_CONFIG_PARSER_H
|
||||
#define TEST_CONFIG_PARSER_H
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
#include "nlohmann/json.hpp"
|
||||
|
||||
namespace OHOS {
|
||||
const std::string STRESS_TEST_CONFIG_FILE_PATH {"/data/testconfig/stressconfig.json"};
|
||||
|
||||
const std::string STRESS_TEST_BMS_KEY {"BMS"};
|
||||
|
||||
struct StressTestLevel {
|
||||
int32_t BMSLevel {1};
|
||||
};
|
||||
|
||||
class TestConfigParser {
|
||||
public:
|
||||
void ParseFromFile4StressTest(const std::string &path, StressTestLevel &stlevel)
|
||||
{
|
||||
std::ifstream jf(path);
|
||||
if (!jf.is_open()) {
|
||||
std::cout << "json file can not open!" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
nlohmann::json jsonObj;
|
||||
jf >> jsonObj;
|
||||
|
||||
const auto &jsonObjEnd = jsonObj.end();
|
||||
if (jsonObj.find(STRESS_TEST_BMS_KEY) != jsonObjEnd) {
|
||||
jsonObj.at(STRESS_TEST_BMS_KEY).get_to(stlevel.BMSLevel);
|
||||
if (stlevel.BMSLevel == 0) {
|
||||
stlevel.BMSLevel = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // TEST_CONFIG_PARSER_H
|
@ -18,8 +18,6 @@ module_output_path = "bundle_framework/bundlemgrsst"
|
||||
ohos_systemtest("BmsCloneSystemTest") {
|
||||
module_out_path = module_output_path
|
||||
|
||||
include_dirs = [ "//foundation/aafwk/standard/services/abilitymgr/include" ]
|
||||
|
||||
sources = [ "bms_clone_system_test.cpp" ]
|
||||
cflags = []
|
||||
if (target_cpu == "arm") {
|
||||
|
@ -64,6 +64,7 @@ ohos_moduletest("bm_command_dump_module_test") {
|
||||
|
||||
external_deps = [
|
||||
"ability_base:base",
|
||||
"ability_base:want",
|
||||
"bundle_framework:appexecfwk_base",
|
||||
"bundle_framework:appexecfwk_core",
|
||||
"common_event_service:cesfwk_innerkits",
|
||||
@ -113,6 +114,7 @@ ohos_moduletest("bm_command_install_module_test") {
|
||||
|
||||
external_deps = [
|
||||
"ability_base:base",
|
||||
"ability_base:want",
|
||||
"bundle_framework:appexecfwk_base",
|
||||
"bundle_framework:appexecfwk_core",
|
||||
"common_event_service:cesfwk_innerkits",
|
||||
@ -162,6 +164,7 @@ ohos_moduletest("bm_command_uninstall_module_test") {
|
||||
|
||||
external_deps = [
|
||||
"ability_base:base",
|
||||
"ability_base:want",
|
||||
"bundle_framework:appexecfwk_base",
|
||||
"bundle_framework:appexecfwk_core",
|
||||
"common_event_service:cesfwk_innerkits",
|
||||
|
@ -46,6 +46,8 @@ ohos_systemtest("bm_command_install_system_test") {
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
"ability_base:base",
|
||||
"ability_base:want",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
"os_account_standard:os_account_innerkits",
|
||||
@ -83,6 +85,8 @@ ohos_systemtest("bm_command_uninstall_system_test") {
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
"ability_base:base",
|
||||
"ability_base:want",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
"os_account_standard:os_account_innerkits",
|
||||
@ -120,6 +124,8 @@ ohos_systemtest("bm_command_dump_system_test") {
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
"ability_base:base",
|
||||
"ability_base:want",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
"os_account_standard:os_account_innerkits",
|
||||
|
@ -20,9 +20,6 @@ config("tools_bm_config_mock") {
|
||||
include_dirs = [
|
||||
"${innerkits_path}/appexecfwk_base/include",
|
||||
"${innerkits_path}/appexecfwk_core/include/bundlemgr",
|
||||
"${aafwk_path}/interfaces/innerkits/uri/include",
|
||||
"${aafwk_path}/interfaces/innerkits/want/include",
|
||||
"${aafwk_path}/interfaces/innerkits/want/include/ohos/aafwk/content",
|
||||
"${appexecfwk_path}/interfaces/innerkits/libeventhandler/include",
|
||||
"${appexecfwk_path}/services/bundlemgr/include",
|
||||
"${appexecfwk_path}/services/bundlemgr/include/sandbox_app",
|
||||
|
Loading…
Reference in New Issue
Block a user