• 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("//base/location/config.gni")
15import("//build/ohos_var.gni")
16import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
17import("//test/xts/tools/build/suite.gni")
18LOCATION_PATH = "../"
19
20module_output_path = "hdf/location/agnss"
21ohos_moduletest_suite("HatsHdfLocationagnssTest") {
22  module_out_path = module_output_path
23  configs = [ ":hdf_agnss" ]
24
25  sources = [ "agnss_hdi_test.cpp" ]
26
27  defines = []
28
29  deps = [
30    "//third_party/googletest:gmock_main",
31    "//third_party/googletest:gtest_main",
32  ]
33  if (is_standard_system) {
34    external_deps = [
35      "c_utils:utils",
36      "hdf_core:libhdf_host",
37      "hdf_core:libhdf_ipc_adapter",
38      "hdf_core:libhdi",
39      "hilog:libhilog",
40      "ipc:ipc_single",
41    ]
42    if (hdf_drivers_interface_location_agnss_enable) {
43      external_deps += [
44        "drivers_interface_location_agnss:liblocation_agnss_proxy_2.0",
45        "cellular_data:tel_cellular_data_api",
46        "core_service:tel_core_service_api",
47      ]
48      defines += [ "HDF_DRIVERS_INTERFACE_AGNSS_ENABLE" ]
49    }
50    if (hdf_drivers_interface_location_geofence_enable) {
51      external_deps += [
52        "drivers_interface_location_geofence:liblocation_geofence_proxy_2.0",
53      ]
54      defines += [ "HDF_DRIVERS_INTERFACE_GEOFENCE_ENABLE" ]
55    }
56    if (hdf_drivers_interface_location_gnss_enable) {
57      external_deps +=
58          [ "drivers_interface_location_gnss:liblocation_gnss_proxy_2.0" ]
59      defines += [ "FEATURE_GNSS_SUPPORT" ]
60    }
61  } else {
62    external_deps = [
63      "hilog:libhilog",
64      "ipc:ipc_single",
65    ]
66  }
67
68  subsystem_name = "xts"
69  part_name = "hats"
70}
71
72config("hdf_agnss") {
73  include_dirs = [
74    "include",
75    "$LOCATION_PATH/gnss",
76  ]
77  cflags = [
78    "-Wall",
79    "-Wextra",
80    "-Werror",
81    "-fsigned-char",
82    "-fno-common",
83    "-fno-strict-aliasing",
84  ]
85}
86