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