build: handle gn format

Signed-off-by: lulu1023 <lujun.wang@archermind.com>
This commit is contained in:
lulu1023 2024-08-28 15:40:02 +08:00
parent 1e72e34291
commit 3a97283ddf
2 changed files with 9 additions and 8 deletions

View File

@ -72,7 +72,7 @@ ohos_shared_library("batteryservice") {
]
public_external_deps = [ "ability_base:want" ]
defines = []
if (battery_manager_feature_set_low_capacity_threshold) {
defines += [ "BATTERY_MANAGER_SET_LOW_CAPACITY_THRESHOLD" ]
@ -85,7 +85,7 @@ ohos_shared_library("batteryservice") {
if (has_hiviewdfx_hisysevent_part) {
defines += [ "HAS_HIVIEWDFX_HISYSEVENT_PART" ]
external_deps += [ "hisysevent:libhisysevent" ]
external_deps += [ "hisysevent:libhisysevent" ]
}
subsystem_name = "powermgr"

View File

@ -34,6 +34,7 @@ config("module_mock_private_config") {
}
defines = []
##############################unittest##########################################
ohos_unittest("test_battery_service_interface") {
module_out_path = "${module_output_path}"
@ -221,7 +222,7 @@ ohos_unittest("test_battery_proxy_mock_iremoteobject") {
if (has_hiviewdfx_hisysevent_part) {
defines += [ "HAS_HIVIEWDFX_HISYSEVENT_PART" ]
external_deps += [ "hisysevent:libhisysevent" ]
external_deps += [ "hisysevent:libhisysevent" ]
}
}
@ -257,7 +258,7 @@ ohos_unittest("test_battery_proxy_mock_messageparcel_write_error") {
if (has_hiviewdfx_hisysevent_part) {
defines += [ "HAS_HIVIEWDFX_HISYSEVENT_PART" ]
external_deps += [ "hisysevent:libhisysevent" ]
external_deps += [ "hisysevent:libhisysevent" ]
}
}
@ -291,10 +292,10 @@ ohos_unittest("test_battery_proxy_mock_sendrequest_error") {
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
]
if (has_hiviewdfx_hisysevent_part) {
defines += [ "HAS_HIVIEWDFX_HISYSEVENT_PART" ]
external_deps += [ "hisysevent:libhisysevent" ]
external_deps += [ "hisysevent:libhisysevent" ]
}
}
@ -327,10 +328,10 @@ ohos_unittest("test_battery_proxy_mock_parcel_read_error") {
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
]
if (has_hiviewdfx_hisysevent_part) {
defines += [ "HAS_HIVIEWDFX_HISYSEVENT_PART" ]
external_deps += [ "hisysevent:libhisysevent" ]
external_deps += [ "hisysevent:libhisysevent" ]
}
}