mirror of
https://gitee.com/openharmony/xts_hats
synced 2024-11-23 06:50:00 +00:00
fix: 添加宏隔离修复battery_hdi失败用例
Signed-off-by: chenjunwu <chenjunwu4@huawei.com>
This commit is contained in:
parent
e6674c4bd2
commit
ba6e4cafb7
@ -15,4 +15,5 @@ declare_args() {
|
||||
hats_rich = false
|
||||
hats_nnrt = false
|
||||
hats_drivers_peripheral_power_wakeup_cause_path = false
|
||||
hats_drivers_peripheral_battery_pc_macro_isolation = false
|
||||
}
|
||||
|
@ -16,7 +16,8 @@
|
||||
"features": [
|
||||
"hats_rich",
|
||||
"hats_nnrt",
|
||||
"hats_drivers_peripheral_power_wakeup_cause_path"
|
||||
"hats_drivers_peripheral_power_wakeup_cause_path",
|
||||
"hats_drivers_peripheral_battery_pc_macro_isolation"
|
||||
],
|
||||
"adapted_system_type": [
|
||||
"mini",
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
import("//build/ohos_var.gni")
|
||||
import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
|
||||
import("//test/xts/hats/build.gni")
|
||||
import("//test/xts/tools/build/suite.gni")
|
||||
|
||||
ohos_moduletest_suite("HatsPowermgrBatteryTest") {
|
||||
@ -29,6 +30,11 @@ ohos_moduletest_suite("HatsPowermgrBatteryTest") {
|
||||
"hilog:libhilog",
|
||||
"ipc:ipc_single",
|
||||
]
|
||||
|
||||
if (hats_drivers_peripheral_battery_pc_macro_isolation) {
|
||||
defines = [ "HATS_DRIVERS_PERIPHERAL_BATTERY_PC_MACRO_ISOLATION" ]
|
||||
}
|
||||
|
||||
subsystem_name = "xts"
|
||||
part_name = "hats"
|
||||
}
|
||||
|
@ -272,8 +272,11 @@ HWTEST_F(HdfBatteryHdiTest, HdfBatteryHdiTest014, TestSize.Level1)
|
||||
printf("HdfBatteryHdiTest014: start.");
|
||||
int curAverage = -1;
|
||||
int32_t ret = g_batteryInterface->GetCurrentAverage(curAverage);
|
||||
#ifdef HATS_DRIVERS_PERIPHERAL_BATTERY_PC_MACRO_ISOLATION
|
||||
EXPECT_NE(0, curAverage);
|
||||
#else
|
||||
EXPECT_EQ(0, ret);
|
||||
|
||||
#endif
|
||||
printf("HdfBatteryHdiTest014: return.");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user