# Copyright (c) 2021-2023 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("//build/test.gni") import("../../batterymgr.gni") ############################################################################### config("module_private_config") { visibility = [ ":*" ] include_dirs = [ "include", "${battery_inner_api}/native/include", "${battery_service_zidl}/include", "${battery_inner_api}/native/include", "${battery_manager_path}/test/utils", ] } ##############################systemtest########################################## ohos_systemtest("test_systemtest") { module_out_path = "${module_output_path}" sources = [ "${battery_manager_path}/test/utils/test_utils.cpp", "src/battery_sttest.cpp", ] configs = [ "${battery_utils}:utils_config", ":module_private_config", "${battery_utils}:coverage_flags", ] deps = [ "${battery_inner_api}:batterysrv_client", "${battery_service}:batteryservice", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", ] external_deps = [ "ability_base:base", "ability_base:want", "c_utils:utils", "common_event_service:cesfwk_innerkits", "hdf_core:libhdf_utils", "hdf_core:libhdi", "hdf_core:libpub_utils", "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] } ##############################systemtest########################################## ohos_systemtest("test_charger_offline_shutdown") { module_out_path = "${module_output_path}" sources = [ "src/charger_offline_shutdown_test.cpp" ] configs = [ "${battery_utils}:utils_config", ":module_private_config", "${battery_utils}:coverage_flags", ] deps = [ "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", ] external_deps = [ "c_utils:utils", "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", ] } ##############################systemtest########################################## ohos_systemtest("test_battery_event_systemtest") { module_out_path = module_output_path sources = [ "${battery_manager_path}/test/utils/test_utils.cpp", "src/battery_event_system_test.cpp", ] configs = [ "${battery_utils}:utils_config", ":module_private_config", "${battery_utils}:coverage_flags", ] deps = [ "${battery_inner_api}:batterysrv_client", "${battery_manager_path}/services:batteryservice", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", ] external_deps = [ "ability_base:want", "battery_manager:batterysrv_client", "c_utils:utils", "common_event_service:cesfwk_innerkits", "drivers_interface_battery:libbattery_proxy_1.2", "drivers_interface_input:libinput_proxy_1.0", "drivers_interface_light:liblight_proxy_1.0", "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] } group("systemtest") { testonly = true deps = [ ":test_battery_event_systemtest", ":test_systemtest", ] }