• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/service"
18if (location_feature_with_geocode) {
19  ohos_unittest("GeocodeServiceAbilityTest") {
20    module_out_path = module_output_path
21    sources = [ "$LOCATION_ROOT_DIR/test/location_geocode/source/geo_convert_service_test.cpp" ]
22
23    include_dirs = [
24      "$LOCATION_ROOT_DIR/interfaces/inner_api/include",
25      "$LOCATION_ROOT_DIR/test/location_geocode/include",
26      "$LOCATION_GEOCONVERT_ROOT/include",
27      "$LOCATION_LOCATOR_ROOT/include",
28    ]
29
30    deps = [
31      "$ARKUI_ROOT_DIR/napi:ace_napi",
32      "$IPC_ROOT_DIR/interfaces/innerkits/ipc_core:ipc_core",
33      "$LOCATION_GEOCONVERT_ROOT:lbsservice_geocode",
34      "$LOCATION_LOCATOR_ROOT:lbsservice_locator",
35      "$LOCATION_ROOT_DIR/frameworks/location_common/common:lbsservice_common",
36      "$SAMGR_ROOT_DIR/safwk/interfaces/innerkits/safwk:system_ability_fwk",
37      "$SAMGR_ROOT_DIR/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy",
38      "$SECURITY_ROOT_DIR/access_token/interfaces/innerkits/nativetoken:libnativetoken",
39      "$SECURITY_ROOT_DIR/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
40      "$START_UP_ROOT_DIR/init/interfaces/innerkits:libbegetutil",
41    ]
42
43    external_deps = [
44      "access_token:libaccesstoken_sdk",
45      "c_utils:utils",
46      "common_event_service:cesfwk_innerkits",
47      "hilog:libhilog",
48      "hisysevent:libhisysevent",
49      "init:libbegetutil",
50      "ipc:ipc_core",
51      "safwk:system_ability_fwk",
52      "samgr:samgr_proxy",
53    ]
54
55    defines = []
56    if (location_feature_with_geocode) {
57      defines += [ "FEATURE_GEOCODE_SUPPORT" ]
58    }
59
60    module_out_path = module_output_path
61  }
62} else {
63  ohos_unittest("GeocodeServiceAbilityTest") {
64    module_out_path = module_output_path
65  }
66}
67
68group("unittest") {
69  testonly = true
70  deps = []
71  deps += [ ":GeocodeServiceAbilityTest" ]
72}
73