• 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  ]
44  include_dirs = [
45  ]
46  public_configs = [ ":test_public_config" ]
47  external_deps = [
48    "ability_base:want",
49    "ability_base:zuri",
50    "ability_runtime:abilitykit_native",
51    "ability_runtime:ability_manager",
52    "bundle_framework:appexecfwk_base",
53    "bundle_framework:appexecfwk_core",
54    "c_utils:utils",
55    "c_utils:utilsbase",
56    "data_share:datashare_common",
57    "data_share:datashare_provider",
58    "eventhandler:libeventhandler",
59    "hilog:libhilog",
60    "ipc:ipc_core",
61    "jsoncpp:jsoncpp",
62    "napi:ace_napi",
63    "preferences:native_preferences",
64    "os_account:os_account_innerkits",
65    "relational_store:native_appdatafwk",
66    "relational_store:native_dataability",
67    "relational_store:native_rdb",
68    "relational_store:rdb_data_share_adapter",
69    "safwk:system_ability_fwk",
70  ]
71  if(is_standard_system) {
72    external_deps += [ ""googletest:gtest_main" ]
73  }
74
75  defines = [
76    "CONTACTSDATA_LOG_TAG = \"ContactsTest\"",
77    "LOG_DOMAIN = 0xD001F09",
78  ]
79}
80
81## UnitTest contacts_test }}}
82
83group("unittest") {
84  testonly = true
85
86  deps = []
87
88  deps += [ ":contacts_test" ]
89}
90