1# Copyright (c) 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("//base/location/config.gni")
15import("//build/test.gni")
16
17module_output_path = "location/native"
18
19ohos_unittest("GeofenceSdkTest") {
20  module_out_path = module_output_path
21  sources = [
22    "$LOCATION_ROOT_DIR/test/location_geofence/source/geofence_sdk_test.cpp",
23    "$LOCATION_ROOT_DIR/test/location_geofence/source/location_gnss_geofence_callback_host_test.cpp",
24  ]
25
26  include_dirs = [ "$LOCATION_ROOT_DIR/test/location_geofence/include" ]
27
28  sanitize = {
29    cfi = true
30    cfi_cross_dso = true
31    debug = false
32    blocklist = "./../../cfi_blocklist.txt"
33  }
34  branch_protector_ret = "pac_ret"
35
36  deps = [
37    "$LOCATION_ROOT_DIR/frameworks/js/napi:geolocation_static",
38    "$LOCATION_ROOT_DIR/frameworks/native/geofence_sdk:geofence_sdk_static",
39  ]
40
41  external_deps = [
42    "ability_base:want",
43    "ability_base:zuri",
44    "ability_runtime:dataobs_manager",
45    "ability_runtime:wantagent_innerkits",
46    "access_token:libaccesstoken_sdk",
47    "access_token:libnativetoken",
48    "access_token:libtoken_setproc",
49    "access_token:libtokenid_sdk",
50    "bundle_framework:appexecfwk_base",
51    "bundle_framework:appexecfwk_core",
52    "c_utils:utils",
53    "common_event_service:cesfwk_innerkits",
54    "data_share:datashare_common",
55    "data_share:datashare_consumer",
56    "hilog:libhilog",
57    "hisysevent:libhisysevent",
58    "init:libbegetutil",
59    "ipc:ipc_core",
60    "location:locator_sdk",
61    "napi:ace_napi",
62    "os_account:os_account_innerkits",
63    "relational_store:native_dataability",
64    "relational_store:native_rdb",
65    "samgr:samgr_proxy",
66  ]
67
68  defines = []
69
70  module_out_path = module_output_path
71}
72
73group("unittest") {
74  testonly = true
75  deps = []
76  deps += [ ":GeofenceSdkTest" ]
77}
78