• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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/domain_account"
18
19config("domain_account_frameworks_config_moduletest") {
20  visibility = [ ":*" ]
21
22  include_dirs = [ "include" ]
23
24  cflags = []
25  if (target_cpu == "arm") {
26    cflags += [ "-DBINDER_IPC_32BIT" ]
27  }
28
29  defines = [
30    "ACCOUNT_LOG_TAG = \"DomainAccountMTestFwk\"",
31    "LOG_DOMAIN = 0xD001B00",
32  ]
33}
34
35ohos_moduletest("domain_account_frameworks_module_test") {
36  module_out_path = module_output_path
37
38  sources = [
39    "src/domain_account_client_module_test.cpp",
40    "src/mock_domain_auth_callback.cpp",
41    "src/mock_domain_plugin.cpp",
42  ]
43  configs = [ ":domain_account_frameworks_config_moduletest" ]
44
45  deps = [
46    "${common_path}:libaccount_common",
47    "${domain_account_framework_path}:domain_account_innerkits",
48    "//base/security/access_token/interfaces/innerkits/accesstoken:libaccesstoken_sdk",
49    "//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
50    "//third_party/googletest:gmock_main",
51    "//third_party/googletest:gtest_main",
52  ]
53
54  external_deps = [
55    "c_utils:utils",
56    "hiviewdfx_hilog_native:libhilog",
57    "ipc:ipc_core",
58    "os_account:os_account_innerkits",
59  ]
60}
61
62group("moduletest") {
63  testonly = true
64
65  deps = [ ":domain_account_frameworks_module_test" ]
66}
67