tests: arch: arm: move test arm_hardfault_validation to new ztest API

Migrate the testsuite tests/arch/arm/arm_hardfault_validation to the
new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
This commit is contained in:
Shaoan Li 2022-07-06 13:51:23 +08:00 committed by Mahesh Mahadevan
parent e0b1d81acb
commit 54d44ee0d6
3 changed files with 4 additions and 9 deletions

View file

@ -1 +1,2 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y

View file

@ -45,7 +45,8 @@ void k_sys_fatal_error_handler(unsigned int reason, const z_arch_esf_t *pEsf)
expected_reason = -1;
}
void test_arm_hardfault(void)
ZTEST(arm_hardfault_validation, test_arm_hardfault)
{
expected_reason = K_ERR_KERNEL_PANIC;

View file

@ -5,12 +5,5 @@
*/
#include <ztest.h>
extern void test_arm_hardfault(void);
/**test case main entry*/
void test_main(void)
{
ztest_test_suite(arm_hardfault_validation,
ztest_unit_test(test_arm_hardfault));
ztest_run_test_suite(arm_hardfault_validation);
}
ZTEST_SUITE(arm_hardfault_validation, NULL, NULL, NULL, NULL, NULL);