• 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("//build/test.gni")
15
16GNSS_UNIT_TEST_DIR = "//base/location/test/location_gnss"
17SUBSYSTEM_DIR = "//base/location/services"
18module_output_path = "location/service"
19
20ohos_unittest("GnssAbilityTest") {
21  module_out_path = module_output_path
22  sources = [
23    "$GNSS_UNIT_TEST_DIR/mock/src/mock_i_cellular_data_manager.cpp",
24    "$GNSS_UNIT_TEST_DIR/source/gnss_ability_stub_test.cpp",
25    "$GNSS_UNIT_TEST_DIR/source/gnss_ability_test.cpp",
26  ]
27
28  include_dirs = [
29    "$GNSS_UNIT_TEST_DIR/include",
30    "$GNSS_UNIT_TEST_DIR/mock/include",
31    "$SUBSYSTEM_DIR/location_gnss/gnss/include",
32    "$SUBSYSTEM_DIR/location_locator/locator/include",
33    "//base/location/interfaces/inner_api/include",
34    "//base/location/test/mock/include",
35  ]
36
37  deps = [
38    "$SUBSYSTEM_DIR/location_gnss/gnss:lbsservice_gnss",
39    "$SUBSYSTEM_DIR/location_locator/locator:lbsservice_locator",
40    "//base/location/frameworks/location_common/common:lbsservice_common",
41    "//base/location/frameworks/native:locator_sdk",
42    "//base/location/test/location_locator:LocatorServiceAbilityTest",
43    "//base/security/access_token/interfaces/innerkits/nativetoken:libnativetoken",
44    "//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
45    "//base/startup/init/interfaces/innerkits:libbegetutil",
46    "//foundation/arkui/napi:ace_napi",
47    "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core",
48    "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk",
49    "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy",
50    "//third_party/googletest:gmock_main",
51    "//third_party/googletest:gtest_main",
52  ]
53
54  external_deps = [
55    "ability_base:want",
56    "access_token:libaccesstoken_sdk",
57    "c_utils:utils",
58    "cellular_data:tel_cellular_data_api",
59    "common_event_service:cesfwk_innerkits",
60    "core_service:tel_core_service_api",
61    "drivers_interface_location_agnss:liblocation_agnss_proxy_1.0",
62    "drivers_interface_location_gnss:liblocation_gnss_proxy_1.0",
63    "eventhandler:libeventhandler",
64    "hdf_core:libhdi",
65    "hisysevent_native:libhisysevent",
66    "hiviewdfx_hilog_native:libhilog",
67  ]
68
69  module_out_path = module_output_path
70}
71
72group("unittest") {
73  testonly = true
74  deps = []
75
76  deps += [ ":GnssAbilityTest" ]
77}
78