• 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("//build/test.gni")
15
16## UnitTest contacts_test {{{
17config("test_public_config") {
18  visibility = [ ":*" ]
19  include_dirs = [ "unittest/include" ]
20  cflags = []
21}
22
23ohos_unittest("contacts_test") {
24  module_out_path = "applications/prebuilt_hap"
25  sources = [
26    "unittest/src/base_test.cpp",
27    "unittest/src/calllogability_test.cpp",
28    "unittest/src/calllogfuzzyquery_test.cpp",
29    "unittest/src/contactability_test.cpp",
30    "unittest/src/contactgroup_test.cpp",
31    "unittest/src/contactpinyin_test.cpp",
32    "unittest/src/contactprofile_test.cpp",
33    "unittest/src/contactquery_test.cpp",
34    "unittest/src/mergecontact_test.cpp",
35    "unittest/src/performance_test.cpp",
36    "unittest/src/random_number_utils.cpp",
37    "unittest/src/recovery_test.cpp",
38    "unittest/src/stability_test.cpp",
39    "unittest/src/voicemailability_test.cpp",
40  ]
41  deps = [
42    "applications/standard/contacts_data:contactsdataability",
43    "//foundation/ability/ability_runtime/frameworks/native/ability/native:abilitykit_native",
44    "//foundation/arkui/napi:ace_napi",
45    "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk",
46    "//third_party/googletest:gtest_main",
47    "//third_party/jsoncpp:jsoncpp",
48  ]
49  include_dirs = [
50    "//utils/system/safwk/native/include",
51    "//commonlibrary/c_utils/base/include",
52    "//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
53    "//base/account/os_account/interfaces/innerkits/include",
54    "//foundation/ability/ability_runtime/interfaces/inner_api/ability_manager/include",
55    "//foundation/ability/ability_runtime/services/abilitymgr/include",
56    "//foundation/ability/ability_runtime/interfaces/kits/native/ability/native",
57  ]
58  public_configs = [ ":test_public_config" ]
59  external_deps = [
60    "ability_base:want",
61    "ability_base:zuri",
62    "ability_runtime:ability_manager",
63    "bundle_framework:appexecfwk_base",
64    "bundle_framework:appexecfwk_core",
65    "c_utils:utils",
66    "c_utils:utilsbase",
67    "data_share:datashare_common",
68    "data_share:datashare_provider",
69    "eventhandler:libeventhandler",
70    "hilog:libhilog",
71    "ipc:ipc_core",
72    "preferences:native_preferences",
73    "relational_store:native_appdatafwk",
74    "relational_store:native_dataability",
75    "relational_store:native_rdb",
76    "relational_store:rdb_data_share_adapter",
77  ]
78
79  defines = [
80    "CONTACTSDATA_LOG_TAG = \"ContactsTest\"",
81    "LOG_DOMAIN = 0xD001F09",
82  ]
83}
84
85## UnitTest contacts_test }}}
86
87group("unittest") {
88  testonly = true
89
90  deps = []
91
92  deps += [ ":contacts_test" ]
93}
94