From 80b2d7722da2ca359b451b62c66eb188dc46283a Mon Sep 17 00:00:00 2001 From: Guo Lixin Date: Mon, 16 May 2022 17:51:22 +0800 Subject: [PATCH] tests: add filter of configs to avoid mismatch test running Some test suites have different test case lists in test_main(), that conforms to different test scenarios defined in testcase.yaml. We use if statement to decide which test case list should run under specific config. But for thoses boards who do not support those configs, we will run test cases on the other side of the if statement even if it has deviated from the original test scenario. So add filter to avoid test scenario running under mismatch config. Signed-off-by: Guo Lixin --- tests/kernel/mem_protect/sys_sem/testcase.yaml | 1 + tests/lib/sprintf/testcase.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/kernel/mem_protect/sys_sem/testcase.yaml b/tests/kernel/mem_protect/sys_sem/testcase.yaml index 0d1d244e4a5..91dbb41c045 100644 --- a/tests/kernel/mem_protect/sys_sem/testcase.yaml +++ b/tests/kernel/mem_protect/sys_sem/testcase.yaml @@ -1,5 +1,6 @@ tests: kernel.memory_protection.sys_sem: + filter: CONFIG_ARCH_HAS_USERSPACE tags: kernel userspace testcases: - sem_take_no_wait diff --git a/tests/lib/sprintf/testcase.yaml b/tests/lib/sprintf/testcase.yaml index 0e3254e4730..b92f15b6a5e 100644 --- a/tests/lib/sprintf/testcase.yaml +++ b/tests/lib/sprintf/testcase.yaml @@ -1,7 +1,7 @@ tests: libraries.libc.sprintf: extra_args: CONF_FILE=prj.conf - filter: not CONFIG_SOC_MCIMX7_M4 + filter: not CONFIG_SOC_MCIMX7_M4 and CONFIG_STDOUT_CONSOLE integration_platforms: - qemu_x86 platform_exclude: native_posix native_posix_64 nrf52_bsim