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("//build/test.gni") 15 16SUBSYSTEM_DIR = "//base/location/services" 17module_output_path = "location/service" 18 19ohos_unittest("LocatorServiceAbilityTest") { 20 module_out_path = module_output_path 21 sources = [ 22 "//base/location/test/location_locator/source/callback_test.cpp", 23 "//base/location/test/location_locator/source/country_code_manager_test.cpp", 24 "//base/location/test/location_locator/source/fusion_controller_test.cpp", 25 "//base/location/test/location_locator/source/location_approximately_permission_test.cpp", 26 "//base/location/test/location_locator/source/location_config_manager_test.cpp", 27 "//base/location/test/location_locator/source/location_without_permission_test.cpp", 28 "//base/location/test/location_locator/source/locator_background_proxy_test.cpp", 29 "//base/location/test/location_locator/source/locator_event_manager_test.cpp", 30 "//base/location/test/location_locator/source/locator_impl_test.cpp", 31 "//base/location/test/location_locator/source/locator_service_test.cpp", 32 "//base/location/test/location_locator/source/report_manager_test.cpp", 33 "//base/location/test/location_locator/source/request_manager_test.cpp", 34 "//base/location/test/location_locator/source/work_record_test.cpp", 35 ] 36 37 include_dirs = [ 38 "$SUBSYSTEM_DIR/location_locator/callback/include", 39 "$SUBSYSTEM_DIR/location_locator/locator/include", 40 "//base/location/interfaces/inner_api/include", 41 "//base/location/test/location_locator/include", 42 "//base/location/test/location_locator/mock/include", 43 "//base/location/test/mock/include", 44 ] 45 46 deps = [ 47 "$SUBSYSTEM_DIR/location_locator/locator:lbsservice_locator", 48 "//base/location/frameworks/location_common/common:lbsservice_common", 49 "//base/location/frameworks/native:locator_sdk", 50 "//base/security/access_token/interfaces/innerkits/nativetoken:libnativetoken", 51 "//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc", 52 "//base/startup/init/interfaces/innerkits:libbegetutil", 53 "//foundation/arkui/napi:ace_napi", 54 "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", 55 "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk", 56 "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", 57 "//third_party/googletest:gmock_main", 58 "//third_party/googletest:gtest_main", 59 ] 60 61 external_deps = [ 62 "ability_base:want", 63 "ability_runtime:app_manager", 64 "access_token:libaccesstoken_sdk", 65 "bundle_framework:appexecfwk_core", 66 "c_utils:utils", 67 "common_event_service:cesfwk_innerkits", 68 "eventhandler:libeventhandler", 69 "hisysevent_native:libhisysevent", 70 "hiviewdfx_hilog_native:libhilog", 71 "init:libbegetutil", 72 "ipc:ipc_core", 73 "samgr:samgr_proxy", 74 ] 75 76 module_out_path = module_output_path 77} 78 79group("unittest") { 80 testonly = true 81 deps = [] 82 83 deps += [ ":LocatorServiceAbilityTest" ] 84} 85