# Copyright (c) 2022 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("//base/account/os_account/os_account.gni") import("//build/test.gni") module_output_path = "os_account/services/account_iam" config("account_iam_native_config_unittest") { visibility = [ ":*" ] include_dirs = [ "include", "//base/useriam/user_auth_framework/interfaces/inner_api", "${services_path}/accountmgr/include/account_iam", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } defines = [ "ACCOUNT_LOG_TAG = \"AccountIAMUTestFwk\"", "LOG_DOMAIN = 0xD001B00", ] } ohos_unittest("account_iam_manager_test") { module_out_path = module_output_path sources = [ "account_iam_manager_test.cpp" ] configs = [ ":account_iam_native_config_unittest", "${services_path}/accountmgr:account_iam_config", ] deps = [ "${account_iam_framework_path}:account_iam_innerkits", "${common_path}:libaccount_common", "${services_path}/accountmgr:accountmgr", "//base/security/access_token/interfaces/innerkits/accesstoken:libaccesstoken_sdk", "//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc", "//base/useriam/user_auth_framework/frameworks/native/client:userauth_client", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] cflags_cc = [] if (has_pin_auth_part) { cflags_cc += [ "-DHAS_PIN_AUTH_PART" ] deps += [ "//base/useriam/pin_auth/frameworks:pinauth_framework" ] } if (has_user_auth_part) { cflags_cc += [ "-DHAS_USER_AUTH_PART" ] } external_deps = [ "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "init:libbegetutil", ] } group("unittest") { testonly = true deps = [ ":account_iam_manager_test" ] }