# 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. import("//build/test.gni") import("../../../../dlp_permission_service.gni") ohos_unittest("dlp_permission_kit_test") { branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true debug = false } subsystem_name = "security" part_name = "dlp_permission_service" module_out_path = part_name + "/" + part_name include_dirs = [ "${dlp_root_dir}/frameworks/common/include", "${dlp_root_dir}/frameworks/dlp_permission/include", "${dlp_root_dir}/interfaces/inner_api/dlp_permission/include", ] sources = [ "unittest/src/dlp_permission_async_stub_test.cpp", "unittest/src/dlp_permission_client_test.cpp", "unittest/src/dlp_permission_kit_test.cpp", "unittest/src/dlp_permission_load_callback_test.cpp", "unittest/src/dlp_permission_proxy_test.cpp", "unittest/src/dlp_sandbox_change_callback_stub_test.cpp", ] cflags_cc = [ "-DHILOG_ENABLE" ] configs = [ "${dlp_root_dir}/config:coverage_flags" ] deps = [ "${dlp_root_dir}/interfaces/inner_api/dlp_permission:libdlp_permission_sdk", ] external_deps = [ "ability_base:want", "access_token:libaccesstoken_sdk", "access_token:libtokensetproc_shared", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "json:nlohmann_json_static", "openssl:libcrypto_shared", ] } group("unittest") { testonly = true deps = [ ":dlp_permission_kit_test" ] }