# Copyright (c) 2022-2024 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. import("//build/test.gni") import("../../../common/config/common.gni") module_output_path = "enterprise_device_management/enterprise_device_management" config("module_private_config") { visibility = [ ":*" ] } ohos_unittest("EdmCommonUnitTest") { module_out_path = module_output_path include_dirs = [ "../../../services/edm/include" ] sources = [ "./bundle_manager_utils_test.cpp", "./edm_permission_test.cpp", "./edm_sys_manager_test.cpp", "./edm_utils_test.cpp", "./external/edm_access_token_manager_impl_test.cpp", "./external/edm_app_manager_impl_test.cpp", "./external/edm_bundle_manager_impl_test.cpp", "./external/edm_os_account_manager_impl_test.cpp", "./external/external_manager_factory_test.cpp", ] configs = [ ":module_private_config", "../../../common/config:coverage_flags", ] deps = [ "../../../common/external:edm_external_adapters", "../../../common/native:edm_commom", "../../../interfaces/inner_api:edmservice_kits", "../../../interfaces/inner_api/plugin_kits:plugin_kits", "../../../services/edm:edmservice", "../utils:edm_unittest_utils", ] external_deps = [ "ability_runtime:app_manager", "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "init:libbegetutil", "ipc:ipc_core", "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] defines = [] if (os_account_edm_enable) { external_deps += [ "os_account:libaccountkits", "os_account:os_account_innerkits", ] defines += [ "OS_ACCOUNT_EDM_ENABLE" ] } sanitize = { boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false integer_overflow = true ubsan = true blocklist = "../cfi_blocklist.txt" } branch_protector_ret = "pac_ret" subsystem_name = "customization" part_name = "enterprise_device_management" } group("unittest") { testonly = true deps = [ # deps file ":EdmCommonUnitTest", ] }