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("//build/test.gni")
15import("../../batterystats.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  ]
26}
27
28ohos_systemtest("batterystats_sys_test") {
29  module_out_path = module_output_path
30
31  sources = [
32    "${batterystats_service_path}/native/src/battery_stats_parser.cpp",
33    "src/batterystats_sys_test.cpp",
34  ]
35
36  configs = [
37    "${batterystats_utils_path}:batterystats_utils_config",
38    ":module_private_config",
39    "${batterystats_utils_path}:coverage_flags",
40  ]
41
42  deps = [
43    "${ability_runtime_path}/frameworks/native/appkit:appkit_native",
44    "${batterystats_inner_api}:batterystats_client",
45    "${batterystats_utils_path}:batterystats_utils",
46    "//third_party/googletest:gtest_main",
47    "//third_party/jsoncpp:jsoncpp",
48  ]
49
50  external_deps = [
51    "ability_base:base",
52    "ability_base:want",
53    "battery_manager:batterysrv_client",
54    "bluetooth:btframework",
55    "c_utils:utils",
56    "call_manager:tel_call_manager_api",
57    "common_event_service:cesfwk_innerkits",
58    "config_policy:configpolicy_util",
59    "display_manager:displaymgr",
60    "hicollie:libhicollie",
61    "hilog:libhilog",
62    "hisysevent:libhisysevent",
63    "hisysevent:libhisyseventmanager",
64    "ipc:ipc_core",
65    "os_account:libaccountkits",
66    "power_manager:powermgr_client",
67    "safwk:system_ability_fwk",
68    "samgr:samgr_proxy",
69    "wifi:wifi_sdk",
70  ]
71}
72
73group("systemtest_batterystats") {
74  testonly = true
75  deps = [ ":batterystats_sys_test" ]
76}
77