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