1# Copyright (c) 2022 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/test.gni") 16 17module_output_path = "location/common" 18 19ohos_unittest("LocationCommonTest") { 20 module_out_path = module_output_path 21 sources = [ 22 "$LOCATION_ROOT_DIR/test/location_common/source/common_utils_test.cpp", 23 "$LOCATION_ROOT_DIR/test/location_common/source/location_common_test.cpp", 24 ] 25 26 include_dirs = [ 27 "$LOCATION_ROOT_DIR/interfaces/inner_api/include", 28 "$LOCATION_ROOT_DIR/services/location_locator/locator/include", 29 "$LOCATION_ROOT_DIR/test/location_common/include", 30 ] 31 32 deps = [ 33 "$LOCATION_ROOT_DIR/frameworks/location_common/common:lbsservice_common", 34 "$LOCATION_ROOT_DIR/services/location_locator/locator:lbsservice_locator", 35 ] 36 37 external_deps = [ 38 "ability_base:want", 39 "ability_base:zuri", 40 "ability_runtime:dataobs_manager", 41 "ability_runtime:wantagent_innerkits", 42 "access_token:libaccesstoken_sdk", 43 "access_token:libnativetoken", 44 "access_token:libtoken_setproc", 45 "access_token:libtokenid_sdk", 46 "bundle_framework:appexecfwk_base", 47 "bundle_framework:appexecfwk_core", 48 "c_utils:utils", 49 "common_event_service:cesfwk_innerkits", 50 "data_share:datashare_common", 51 "data_share:datashare_consumer", 52 "hilog:libhilog", 53 "hisysevent:libhisysevent", 54 "init:libbegetutil", 55 "ipc:ipc_core", 56 "location:locator_sdk", 57 "os_account:os_account_innerkits", 58 "relational_store:native_dataability", 59 "relational_store:native_rdb", 60 "samgr:samgr_proxy", 61 ] 62 63 defines = [] 64 if (location_feature_with_geocode) { 65 defines += [ "FEATURE_GEOCODE_SUPPORT" ] 66 } 67 68 if (location_feature_with_gnss) { 69 defines += [ "FEATURE_GNSS_SUPPORT" ] 70 } 71 72 module_out_path = module_output_path 73} 74 75group("unittest") { 76 testonly = true 77 deps = [] 78 deps += [ ":LocationCommonTest" ] 79} 80