• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/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    "//third_party/googletest/googlemock/include",
25  ]
26}
27
28app_account_mock_sources = []
29
30config("app_account_native_config_moduletest") {
31  visibility = [ ":*" ]
32
33  include_dirs = []
34
35  cflags = []
36  if (target_cpu == "arm") {
37    cflags += [ "-DBINDER_IPC_32BIT" ]
38  }
39
40  defines = [
41    "ACCOUNT_LOG_TAG = \"AppAccountMTestFwk\"",
42    "LOG_DOMAIN = 0xD001B00",
43  ]
44}
45
46ohos_moduletest("app_account_manager_module_test") {
47  module_out_path = module_output_path
48
49  sources = [ "app_account_manager_module_test.cpp" ]
50  sources += app_account_mock_sources
51
52  configs = [
53    ":app_account_interfaces_native_config_mock",
54    ":app_account_native_config_moduletest",
55  ]
56
57  deps = [
58    "${app_account_innerkits_native_path}:app_account_innerkits",
59    "${common_path}:libaccount_common",
60    "//third_party/googletest:gmock_main",
61    "//third_party/googletest:gtest_main",
62  ]
63
64  external_deps = [
65    "ability_base:want",
66    "ability_runtime:app_manager",
67    "bundle_framework:appexecfwk_base",
68    "bundle_framework:appexecfwk_core",
69    "hiviewdfx_hilog_native:libhilog",
70    "ipc:ipc_core",
71    "kv_store:distributeddata_inner",
72  ]
73}
74
75group("moduletest") {
76  testonly = true
77
78  deps = [ ":app_account_manager_module_test" ]
79}
80