1# Copyright (c) 2021-2022 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("../../../../../os_account.gni") 16 17module_output_path = "os_account/frameworks/app_account" 18 19config("app_account_interfaces_native_config_mock") { 20 include_dirs = [ 21 "${app_account_innerkits_native_path}/test/mock", 22 "${app_account_services_path}/include/appaccount", 23 "${app_account_services_path}/include", 24 ] 25} 26 27app_account_mock_sources = [] 28 29config("app_account_native_config_moduletest") { 30 visibility = [ ":*" ] 31 32 include_dirs = [] 33 34 cflags = [] 35 if (target_cpu == "arm") { 36 cflags += [ "-DBINDER_IPC_32BIT" ] 37 } 38 39 defines = [ 40 "ACCOUNT_LOG_TAG = \"AppAccountMTestFwk\"", 41 "LOG_DOMAIN = 0xD001B00", 42 ] 43} 44 45ohos_moduletest("app_account_manager_module_test") { 46 branch_protector_ret = "pac_ret" 47 48 sanitize = { 49 cfi = true 50 cfi_cross_dso = true 51 debug = false 52 } 53 54 module_out_path = module_output_path 55 56 sources = [ "app_account_manager_module_test.cpp" ] 57 sources += app_account_mock_sources 58 59 configs = [ 60 ":app_account_interfaces_native_config_mock", 61 ":app_account_native_config_moduletest", 62 ] 63 64 deps = [ 65 "${app_account_innerkits_native_path}:app_account_innerkits", 66 "${common_path}:libaccount_common", 67 "//third_party/googletest:gmock_main", 68 "//third_party/googletest:gtest_main", 69 ] 70 71 external_deps = [ 72 "ability_base:want", 73 "c_utils:utils", 74 "hilog:libhilog", 75 "ipc:ipc_single", 76 ] 77} 78 79group("moduletest") { 80 testonly = true 81 82 deps = [ ":app_account_manager_module_test" ] 83} 84