• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 = "battery_statistics/battery_statistics"
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  sanitize = {
32    cfi = true
33    cfi_cross_dso = true
34    debug = false
35  }
36
37  sources = [
38    "${batterystats_service_path}/native/src/battery_stats_parser.cpp",
39    "src/batterystats_sys_test.cpp",
40  ]
41
42  configs = [
43    "${batterystats_service_path}:batterystats_public_config",
44    "${batterystats_utils_path}:batterystats_utils_config",
45    ":module_private_config",
46    "${batterystats_utils_path}:coverage_flags",
47  ]
48
49  deps = [
50    "${batterystats_inner_api}:batterystats_client",
51    "${batterystats_utils_path}:batterystats_utils",
52  ]
53
54  external_deps = [
55    "ability_base:base",
56    "ability_base:want",
57    "ability_runtime:appkit_native",
58    "battery_manager:batterysrv_client",
59    "bluetooth:btframework",
60    "call_manager:tel_call_manager_api",
61    "cJSON:cjson",
62    "c_utils:utils",
63    "common_event_service:cesfwk_innerkits",
64    "config_policy:configpolicy_util",
65    "display_manager:displaymgr",
66    "googletest:gtest_main",
67    "hicollie:libhicollie",
68    "hilog:libhilog",
69    "hisysevent:libhisysevent",
70    "hisysevent:libhisyseventmanager",
71    "ipc:ipc_core",
72    "os_account:libaccountkits",
73    "power_manager:powermgr_client",
74    "safwk:system_ability_fwk",
75    "samgr:samgr_proxy",
76    "wifi:wifi_sdk",
77  ]
78}
79
80group("systemtest_batterystats") {
81  testonly = true
82  deps = [ ":batterystats_sys_test" ]
83}
84