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