1# Copyright (C) 2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/test.gni") 15import("//foundation/bundlemanager/app_domain_verify/app_domain_verify.gni") 16 17config("module_private_config") { 18 visibility = [ ":*" ] 19 configs = [ "//build/config/compiler:exceptions" ] 20 include_dirs = [ 21 "${app_domain_verify_client_path}/include", 22 "${app_domain_verify_service_path}/include", 23 "${app_domain_verify_service_path}/include/agent/core", 24 "${app_domain_verify_service_path}/include/agent/zidl", 25 "${app_domain_verify_service_path}/include/agent/bms", 26 "${app_domain_verify_service_path}/include/manager/rdb", 27 "${app_domain_verify_service_path}/include/manager/core", 28 "${app_domain_verify_service_path}/include/manager/constant", 29 "${app_domain_verify_service_path}/include/manager/zidl", 30 "${app_domain_verify_common_path}/include", 31 "${app_domain_verify_frameworks_common_path}/include", 32 "${app_domain_verify_frameworks_common_path}/include/utils", 33 "${app_domain_verify_frameworks_extension_path}/include", 34 "${app_domain_verify_test_path}/mock/include", 35 "${app_domain_verify_test_path}/mock/include/mock_http_client", 36 "${app_domain_verify_frameworks_common_path}/include/dfx", 37 ] 38} 39 40module_output_path = "app_domain_verify/app_domain_verify" 41 42ohos_unittest("app_domain_verify_module_test") { 43 module_out_path = module_output_path 44 45 sources = [ 46 "${app_domain_verify_test_path}/mock/src/mock_access_token.cpp", 47 "app_domain_verify_agent_module_test.cpp", 48 "app_domain_verify_mgr_module_test.cpp", 49 ] 50 configs = [ ":module_private_config" ] 51 external_deps = [ 52 "ability_base:want", 53 "ability_base:zuri", 54 "access_token:libaccesstoken_sdk", 55 "access_token:libnativetoken_shared", 56 "access_token:libtokenid_sdk", 57 "access_token:libtokensetproc_shared", 58 "bundle_framework:appexecfwk_base", 59 "bundle_framework:appexecfwk_core", 60 "c_utils:utils", 61 "eventhandler:libeventhandler", 62 "ffrt:libffrt", 63 "hicollie:libhicollie", 64 "hilog:libhilog", 65 "hisysevent:libhisysevent", 66 "image_framework:image_native", 67 "ipc:ipc_core", 68 "netmanager_base:net_conn_manager_if", 69 "os_account:os_account_innerkits", 70 "relational_store:native_rdb", 71 "safwk:system_ability_fwk", 72 "samgr:samgr_proxy", 73 ] 74 75 defines = [ "API_EXPORT=__attribute__((visibility (\"default\")))" ] 76 deps = [ 77 "${app_domain_verify_client_path}:app_domain_verify_agent_client", 78 "${app_domain_verify_client_path}:app_domain_verify_mgr_client", 79 "${app_domain_verify_common_path}:app_domain_verify_common", 80 "${app_domain_verify_frameworks_common_path}:app_domain_verify_frameworks_common", 81 "${app_domain_verify_frameworks_extension_path}:app_domain_verify_extension_framework", 82 "${app_domain_verify_frameworks_verifier_path}:app_domain_verify_agent_verifier", 83 "${app_domain_verify_service_path}:app_domain_verify_agent_service", 84 "${app_domain_verify_service_path}:app_domain_verify_mgr_service", 85 "//third_party/googletest:gmock_main", 86 "//third_party/googletest:gtest_main", 87 ] 88} 89