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 "cellular_data:tel_cellular_data_api", 37 "core_service:tel_core_service_api", 38 "hdf_core:libhdf_host", 39 "hdf_core:libhdf_ipc_adapter", 40 "hdf_core:libhdi", 41 "hilog:libhilog", 42 "ipc:ipc_single", 43 ] 44 if (hdf_drivers_interface_location_agnss_enable) { 45 external_deps += 46 [ "drivers_interface_location_agnss:liblocation_agnss_proxy_2.0" ] 47 defines += [ "HDF_DRIVERS_INTERFACE_AGNSS_ENABLE" ] 48 } 49 if (hdf_drivers_interface_location_geofence_enable) { 50 external_deps += [ 51 "drivers_interface_location_geofence:liblocation_geofence_proxy_2.0", 52 ] 53 defines += [ "HDF_DRIVERS_INTERFACE_GEOFENCE_ENABLE" ] 54 } 55 if (hdf_drivers_interface_location_gnss_enable) { 56 external_deps += 57 [ "drivers_interface_location_gnss:liblocation_gnss_proxy_2.0" ] 58 defines += [ "FEATURE_GNSS_SUPPORT" ] 59 } 60 } else { 61 external_deps = [ 62 "hilog:libhilog", 63 "ipc:ipc_single", 64 ] 65 } 66 67 subsystem_name = "xts" 68 part_name = "hats" 69} 70 71config("hdf_agnss") { 72 include_dirs = [ 73 "include", 74 "$LOCATION_PATH/gnss", 75 ] 76 cflags = [ 77 "-Wall", 78 "-Wextra", 79 "-Werror", 80 "-fsigned-char", 81 "-fno-common", 82 "-fno-strict-aliasing", 83 ] 84} 85