1# Copyright (c) 2021-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/powermgr/battery_statistics/batterystats.gni") 15import("//build/test.gni") 16 17module_output_path = "${batterystats_part_name}/batterystats" 18 19config("module_private_config") { 20 visibility = [ ":*" ] 21 22 include_dirs = [ 23 "include", 24 "${batterystats_service_native}/include", 25 "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include/xcollie", 26 "//base/telephony/call_manager/interfaces/innerkits", 27 "//foundation/communication/bluetooth/services/bluetooth/common/", 28 "//foundation/communication/wifi/wifi/utils/inc", 29 ] 30} 31 32ohos_systemtest("batterystats_sys_test") { 33 module_out_path = module_output_path 34 35 sources = [ 36 "${batterystats_service_path}/native/src/battery_stats_parser.cpp", 37 "src/batterystats_sys_test.cpp", 38 ] 39 40 configs = [ 41 "${batterystats_utils_path}:batterystats_utils_config", 42 ":module_private_config", 43 ] 44 45 deps = [ 46 "${ability_runtime_path}/frameworks/native/appkit:appkit_native", 47 "${batterystats_innerkits}:batterystats_client", 48 "${batterystats_utils_path}:batterystats_utils", 49 "//third_party/googletest:gtest_main", 50 "//third_party/jsoncpp:jsoncpp", 51 ] 52 53 external_deps = [ 54 "ability_base:base", 55 "ability_base:want", 56 "battery_manager:batterysrv_client", 57 "c_utils:utils", 58 "common_event_service:cesfwk_innerkits", 59 "core_service:tel_core_service_api", 60 "display_manager:displaymgr", 61 "eventhandler:libeventhandler", 62 "hicollie_native:libhicollie", 63 "hisysevent_native:libhisysevent", 64 "hisysevent_native:libhisyseventmanager", 65 "hiviewdfx_hilog_native:libhilog", 66 "ipc:ipc_core", 67 "os_account:libaccountkits", 68 "power_manager:powermgr_client", 69 "safwk:system_ability_fwk", 70 "samgr:samgr_proxy", 71 ] 72} 73 74group("systemtest_batterystats") { 75 testonly = true 76 deps = [ ":batterystats_sys_test" ] 77} 78