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/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 "//third_party/googletest:gtest_main", 48 "//third_party/jsoncpp:jsoncpp", 49 ] 50 51 external_deps = [ 52 "config_policy:configpolicy_util", 53 "hilog:libhilog", 54 ] 55 if (has_battery_c_utils_part) { 56 external_deps += [ "c_utils:utils" ] 57 } 58} 59 60group("systemtest") { 61 testonly = true 62 63 deps = [ ":test_battery_sys_test" ] 64} 65