# Copyright (C) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//base/location/config.gni") import("//build/test.gni") module_output_path = "location/service" if (location_feature_with_geocode) { ohos_unittest("GeocodeServiceAbilityTest") { module_out_path = module_output_path sources = [ "$LOCATION_ROOT_DIR/test/location_geocode/source/geo_convert_service_test.cpp" ] include_dirs = [ "$LOCATION_ROOT_DIR/interfaces/inner_api/include", "$LOCATION_ROOT_DIR/test/location_geocode/include", "$LOCATION_ROOT_DIR/test/location_geocode/mock/include", "$LOCATION_GEOCONVERT_ROOT/include", "$LOCATION_LOCATOR_ROOT/include", ] deps = [ "$ARKUI_ROOT_DIR/napi:ace_napi", "$GOOGLE_TEST_DIR:gmock_main", "$GOOGLE_TEST_DIR:gtest_main", "$IPC_ROOT_DIR/interfaces/innerkits/ipc_core:ipc_core", "$LOCATION_GEOCONVERT_ROOT:lbsservice_geocode_static", "$LOCATION_LOCATOR_ROOT:lbsservice_locator_static", "$LOCATION_ROOT_DIR/frameworks/js/napi:geolocation_static", "$LOCATION_ROOT_DIR/frameworks/location_common/common:lbsservice_common_static", "$SAMGR_ROOT_DIR/safwk/interfaces/innerkits/safwk:system_ability_fwk", "$SAMGR_ROOT_DIR/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "$START_UP_ROOT_DIR/init/interfaces/innerkits:libbegetutil", ] sanitize = { cfi = true cfi_cross_dso = true debug = false blocklist = "./../../cfi_blocklist.txt" } branch_protector_ret = "pac_ret" external_deps = [ "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libtoken_setproc", "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", "hilog:libhilog", "hisysevent:libhisysevent", "init:libbegetutil", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] defines = [] if (location_feature_with_geocode) { defines += [ "FEATURE_GEOCODE_SUPPORT" ] } module_out_path = module_output_path } } else { ohos_unittest("GeocodeServiceAbilityTest") { module_out_path = module_output_path } } group("unittest") { testonly = true deps = [] deps += [ ":GeocodeServiceAbilityTest" ] }