• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2023 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/ohos.gni")
15import("//build/test.gni")
16
17module_output_path = "drivers_peripheral_location_gnss/gnss"
18gnss_hdi_service_path = "../../../gnss/hdi_service"
19
20ohos_unittest("hdf_gnss_location") {
21  module_out_path = module_output_path
22
23  include_dirs = [
24    "./gnss/include",
25    "${gnss_hdi_service_path}",
26  ]
27  deps = [
28    "${gnss_hdi_service_path}:hdi_location_gnss_service",
29    "${gnss_hdi_service_path}:libgnss_interface_service_2.0"
30  ]
31
32  sources = [
33    "gnss/source/peripheral_gnss_test.cpp",
34    "gnss/source/gnss_interface_impl_mock.cpp",
35    "gnss/source/hdi_gnss_event_callback_mock.cpp",
36    "gnss/source/gnss_measurement_callback_test.cpp",
37  ]
38
39   cflags = [
40    "-Wall",
41    "-Wextra",
42    "-Werror",
43    "-fsigned-char",
44    "-fno-common",
45    "-fno-strict-aliasing",
46  ]
47
48  if (is_standard_system) {
49    external_deps = [
50      "c_utils:utils",
51      "hdf_core:libhdf_host",
52      "hdf_core:libhdf_ipc_adapter",
53      "hdf_core:libhdf_utils",
54      "hdf_core:libhdi",
55      "hilog:libhilog",
56      "ipc:ipc_single",
57      "samgr:samgr_proxy",
58    ]
59  } else {
60    external_deps = [
61      "hilog:libhilog",
62      "ipc:ipc_single",
63    ]
64  }
65
66  external_deps +=
67      [ "drivers_interface_location_gnss:liblocation_gnss_stub_2.0" ]
68}
69
70