• 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 calendarmanager_test {{{
17config("test_public_config") {
18  visibility = [ ":*" ]
19  include_dirs = [ "unittest/include" ]
20  cflags = []
21}
22
23ohos_unittest("calendarmanager_test") {
24  branch_protector_ret = "pac_ret"
25  sanitize = {
26    cfi = true
27    cfi_cross_dso = true
28    debug = false
29  }
30  module_out_path = "applications/calendardata"
31  sources = [
32    "unittest/src/calendar_manager_test.cpp",
33    "unittest/src/calendar_test.cpp",
34    "unittest/src/data_share_helper_manager_test.cpp",
35    "unittest/src/event_attendee_test.cpp",
36    "unittest/src/event_filter_test.cpp",
37    "unittest/src/event_location_test.cpp",
38    "unittest/src/event_reminder_test.cpp",
39    "unittest/src/event_service_test.cpp",
40    "unittest/src/get_self_permissions.cpp",
41    "unittest/src/test_main.cpp",
42  ]
43  deps = [
44    "//applications/standard/calendardata/calendarmanager:calendarmanager_static",
45    "//third_party/googletest:gmock",
46    "//third_party/googletest:gtest",
47  ]
48  include_dirs = [
49    "//utils/system/safwk/native/include",
50    "//commonlibrary/c_utils/base/include",
51    "//base/security/access_token/frameworks/common/include",
52    "//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
53    "//third_party/jsoncpp",
54    "//third_party/jsoncpp/include/json",
55    "//base/account/os_account/interfaces/innerkits/include",
56    "//foundation/ability/ability_runtime/interfaces/inner_api/ability_manager/include",
57    "//foundation/ability/ability_runtime/services/abilitymgr/include",
58    "//foundation/ability/ability_runtime/interfaces/kits/native/ability/native",
59    "//applications/standard/calendardata/calendarmanager/common",
60    "//applications/standard/calendardata/calendarmanager/native/include",
61  ]
62  public_configs = [ ":test_public_config" ]
63  external_deps = [
64    "ability_base:want",
65    "ability_base:zuri",
66    "ability_runtime:ability_manager",
67    "ability_runtime:abilitykit_native",
68    "access_token:libaccesstoken_sdk",
69    "access_token:libnativetoken",
70    "access_token:libtoken_setproc",
71    "c_utils:utils",
72    "data_share:datashare_common",
73    "data_share:datashare_consumer",
74    "hilog:libhilog",
75    "ipc:ipc_single",
76    "napi:ace_napi",
77    "safwk:system_ability_fwk",
78    "samgr:samgr_proxy",
79  ]
80
81  defines = []
82}
83
84## UnitTest calendarmanager_test }}}
85
86group("unittest") {
87  testonly = true
88
89  deps = []
90
91  deps += [ ":calendarmanager_test" ]
92}
93