• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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")
15import("../../../../battery.gni")
16
17module_output_path = "drivers_peripheral_battery/drivers_peripheral_battery"
18
19###############################################################################
20config("module_private_config") {
21  visibility = [ ":*" ]
22
23  include_dirs = [
24    "include",
25    "../unittest/include",
26    "//drivers/peripheral/battery/interfaces/include/",
27    "//drivers/peripheral/battery/include/",
28    "../../include",
29    "../../../../utils/include",
30  ]
31}
32
33##############################systemtest_battery_sys_test##########################################
34ohos_systemtest("test_battery_sys_test") {
35  module_out_path = module_output_path
36
37  include_dirs = [ "../../../../utils/include" ]
38
39  sources = [
40    "../../src/battery_config.cpp",
41    "src/battery_sys_test.cpp",
42  ]
43
44  configs = [ ":module_private_config" ]
45
46  deps = []
47
48  external_deps = [
49    "cJSON:cjson",
50    "googletest:gtest_main",
51    "hdf_core:libpub_utils",
52    "hilog:libhilog",
53  ]
54  if (drivers_peripheral_battery_feature_config_policy) {
55    external_deps += [ "config_policy:configpolicy_util" ]
56  }
57  if (drivers_peripheral_battery_feature_c_utils) {
58    external_deps += [ "c_utils:utils" ]
59  }
60}
61
62group("systemtest") {
63  testonly = true
64
65  deps = [ ":test_battery_sys_test" ]
66}
67