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("//base/account/os_account/os_account.gni") 15import("//build/test.gni") 16 17module_output_path = "os_account/frameworks/os_account" 18 19config("os_account_service_config_unittest") { 20 visibility = [ ":*" ] 21 22 include_dirs = [] 23 24 cflags = [] 25 if (target_cpu == "arm") { 26 cflags += [ "-DBINDER_IPC_32BIT" ] 27 } 28 29 defines = [ 30 "ACCOUNT_LOG_TAG = \"OsAccountUTestFwk\"", 31 "LOG_DOMAIN = 0xD001B00", 32 ] 33} 34 35ohos_unittest("os_account_info_test") { 36 module_out_path = module_output_path 37 38 sources = [ "os_account_info_test.cpp" ] 39 40 configs = [ ":os_account_service_config_unittest" ] 41 42 deps = [ 43 "${common_path}:libaccount_common", 44 "${os_account_innerkits_native_path}:os_account_innerkits", 45 "//third_party/googletest:gmock_main", 46 "//third_party/googletest:gtest_main", 47 ] 48 49 external_deps = [ 50 "ability_base:base", 51 "ability_base:want", 52 "bundle_framework:appexecfwk_base", 53 "bundle_framework:appexecfwk_core", 54 "eventhandler:libeventhandler", 55 "hiviewdfx_hilog_native:libhilog", 56 "ipc:ipc_core", 57 "kv_store:distributeddata_inner", 58 ] 59} 60 61ohos_unittest("os_account_subscribe_info_test") { 62 module_out_path = module_output_path 63 64 sources = [ "os_account_subscribe_info_test.cpp" ] 65 66 configs = [ ":os_account_service_config_unittest" ] 67 68 deps = [ 69 "${common_path}:libaccount_common", 70 "${os_account_innerkits_native_path}:os_account_innerkits", 71 "//third_party/googletest:gtest_main", 72 ] 73 74 external_deps = [ 75 "ipc:ipc_core", 76 ] 77} 78 79group("unittest") { 80 testonly = true 81 82 deps = [ 83 ":os_account_info_test", 84 ":os_account_subscribe_info_test", 85 ] 86} 87