tests: pm: select HAS_PM
Some tests provide their own PM hooks, adapted for testing purposes. Add a new option to select HAS_PM, so that CONFIG_PM can be enabled. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
parent
3d2194f11e
commit
bddf2d9dc0
|
@ -8,3 +8,9 @@ endmenu
|
||||||
module = APP
|
module = APP
|
||||||
module-str = Application
|
module-str = Application
|
||||||
source "subsys/logging/Kconfig.template.log_config"
|
source "subsys/logging/Kconfig.template.log_config"
|
||||||
|
|
||||||
|
|
||||||
|
config APP_PROVIDE_PM_HOOKS
|
||||||
|
bool "Application provides PM hooks"
|
||||||
|
default y
|
||||||
|
select HAS_PM
|
||||||
|
|
11
tests/subsys/pm/device_wakeup_api/Kconfig
Normal file
11
tests/subsys/pm/device_wakeup_api/Kconfig
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Copyright (c) 2023 Nordic Semiconductor ASA
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
menu "Zephyr"
|
||||||
|
source "Kconfig.zephyr"
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
config TEST_PROVIDE_PM_HOOKS
|
||||||
|
bool "Provide PM hooks for test purposes"
|
||||||
|
default y
|
||||||
|
select HAS_PM
|
11
tests/subsys/pm/policy_api/Kconfig
Normal file
11
tests/subsys/pm/policy_api/Kconfig
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Copyright (c) 2023 Nordic Semiconductor ASA
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
menu "Zephyr"
|
||||||
|
source "Kconfig.zephyr"
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
config TEST_PROVIDE_PM_HOOKS
|
||||||
|
bool "Provide PM hooks for test purposes"
|
||||||
|
default y
|
||||||
|
select HAS_PM
|
|
@ -9,6 +9,20 @@
|
||||||
#include <zephyr/sys_clock.h>
|
#include <zephyr/sys_clock.h>
|
||||||
#include <zephyr/ztest.h>
|
#include <zephyr/ztest.h>
|
||||||
|
|
||||||
|
void pm_state_set(enum pm_state state, uint8_t substate_id)
|
||||||
|
{
|
||||||
|
ARG_UNUSED(substate_id);
|
||||||
|
ARG_UNUSED(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id)
|
||||||
|
{
|
||||||
|
ARG_UNUSED(state);
|
||||||
|
ARG_UNUSED(substate_id);
|
||||||
|
|
||||||
|
irq_unlock(0);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM_POLICY_DEFAULT
|
#ifdef CONFIG_PM_POLICY_DEFAULT
|
||||||
/**
|
/**
|
||||||
* @brief Test the behavior of pm_policy_next_state() when
|
* @brief Test the behavior of pm_policy_next_state() when
|
||||||
|
|
11
tests/subsys/pm/power_mgmt/Kconfig
Normal file
11
tests/subsys/pm/power_mgmt/Kconfig
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Copyright (c) 2023 Nordic Semiconductor ASA
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
menu "Zephyr"
|
||||||
|
source "Kconfig.zephyr"
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
config TEST_PROVIDE_PM_HOOKS
|
||||||
|
bool "Provide PM hooks for test purposes"
|
||||||
|
default y
|
||||||
|
select HAS_PM
|
11
tests/subsys/pm/power_mgmt_multicore/Kconfig
Normal file
11
tests/subsys/pm/power_mgmt_multicore/Kconfig
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Copyright (c) 2023 Nordic Semiconductor ASA
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
menu "Zephyr"
|
||||||
|
source "Kconfig.zephyr"
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
config TEST_PROVIDE_PM_HOOKS
|
||||||
|
bool "Provide PM hooks for test purposes"
|
||||||
|
default y
|
||||||
|
select HAS_PM
|
Loading…
Reference in a new issue