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 19ROOT_PATH = "../../../../../../drivers/peripheral" 20 21module_output_path = "hdf/location/gnss" 22ohos_moduletest_suite("HatsHdfLocationgnssTest") { 23 module_out_path = module_output_path 24 25 sources = [ "location_gnss_test.cpp" ] 26 27 configs = [ ":hdf_gnss" ] 28 29 defines = [] 30 31 deps = [ 32 "${ROOT_PATH}/location/gnss/hdi_service:liblocation_gnss_hdi_driver", 33 "//third_party/googletest:gmock_main", 34 "//third_party/googletest:gtest_main", 35 ] 36 if (is_standard_system) { 37 external_deps = [ 38 "c_utils:utils", 39 "hdf_core:libhdf_host", 40 "hdf_core:libhdf_ipc_adapter", 41 "hdf_core:libhdi", 42 "hilog:libhilog", 43 "ipc:ipc_single", 44 ] 45 if (hdf_drivers_interface_location_agnss_enable) { 46 external_deps += 47 [ "drivers_interface_location_agnss:liblocation_agnss_proxy_2.0" ] 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_gnss") { 73 include_dirs = [ "include" ] 74 cflags = [ 75 "-Wall", 76 "-Wextra", 77 "-Werror", 78 "-fsigned-char", 79 "-fno-common", 80 "-fno-strict-aliasing", 81 ] 82} 83