mirror of
https://gitee.com/openharmony/xts_hats
synced 2024-11-30 18:41:17 +00:00
!914 fix: add xts test for interface GetWakeupReason
Merge pull request !914 from yangshuxiang/master
This commit is contained in:
commit
6b20e6f191
@ -14,4 +14,5 @@ import("//build/ohos.gni")
|
||||
declare_args() {
|
||||
hats_rich = false
|
||||
hats_nnrt = false
|
||||
hats_drivers_peripheral_power_wakeup_cause_path = false
|
||||
}
|
||||
|
@ -15,7 +15,8 @@
|
||||
"syscap": [],
|
||||
"features": [
|
||||
"hats_rich",
|
||||
"hats_nnrt"
|
||||
"hats_nnrt",
|
||||
"hats_drivers_peripheral_power_wakeup_cause_path"
|
||||
],
|
||||
"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("HatsPowermgrPowerTest") {
|
||||
@ -29,6 +30,11 @@ ohos_moduletest_suite("HatsPowermgrPowerTest") {
|
||||
"hilog:libhilog",
|
||||
"ipc:ipc_single",
|
||||
]
|
||||
|
||||
if (hats_drivers_peripheral_power_wakeup_cause_path) {
|
||||
defines = [ "HATS_DRIVER_PERIPHERAL_POWER_WAKEUP_CAUSE_PATH" ]
|
||||
}
|
||||
|
||||
subsystem_name = "xts"
|
||||
part_name = "hats"
|
||||
}
|
||||
|
@ -641,4 +641,20 @@ HWTEST_F(HdfPowerHdiTest, HdfPowerHdiTest037, TestSize.Level3)
|
||||
EXPECT_TRUE(OHOS::HDI::Power::V1_1::RunningLockType::RUNNINGLOCK_BUTT == 66);
|
||||
printf("HdfPowerHdiTest037: end.");
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: HdfPowerHdiTest038
|
||||
* @tc.desc: check GetWakeupReason
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
HWTEST_F(HdfPowerHdiTest, HdfPowerHdiTest038, TestSize.Level1)
|
||||
{
|
||||
std::string testName = "HdfPowerHdiTest038";
|
||||
int32_t ret = g_powerInterface->GetWakeupReason(testName);
|
||||
#ifdef HATS_DRIVER_PERIPHERAL_POWER_WAKEUP_CAUSE_PATH
|
||||
EXPECT_EQ(0, ret);
|
||||
#else
|
||||
EXPECT_NE(0, ret);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user