From b97d97ff176f3524a74b7be66ec32c9fa8880a5d Mon Sep 17 00:00:00 2001 From: Yong Cong Sin Date: Tue, 23 Jul 2024 12:53:01 +0800 Subject: [PATCH] tests: gdbstub: minor refactor to the testcase.yaml Change the `platform_allow` to multi-line format so that newly supported archs/boards can be added as a new line. Refactor the tags out to `common`, and add `CONFIG_ARCH_HAS_GDBSTUB` filter Signed-off-by: Yong Cong Sin Signed-off-by: Yong Cong Sin --- tests/subsys/debug/gdbstub/testcase.yaml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/subsys/debug/gdbstub/testcase.yaml b/tests/subsys/debug/gdbstub/testcase.yaml index adb259b4122..25aaf081b2a 100644 --- a/tests/subsys/debug/gdbstub/testcase.yaml +++ b/tests/subsys/debug/gdbstub/testcase.yaml @@ -4,10 +4,17 @@ # SPDX-License-Identifier: Apache-2.0 # +common: + tags: + - debug + - gdbstub + filter: CONFIG_ARCH_HAS_GDBSTUB + tests: # Connect to Zephyr gdbstub and run a simple GDB script debug.gdbstub.breakpoints: - platform_allow: qemu_x86 + platform_allow: + - qemu_x86 harness: pytest harness_config: pytest_root: @@ -19,9 +26,6 @@ tests: - "test_breakpoints.gdbinit" - "--gdb_target_remote" - "tcp::5678" - tags: - - debug - - gdbstub extra_configs: # Make sure the gdbstub port chosen is unique for this test to avoid conflicts # when Twister runs tests in parallel on the same host. @@ -33,7 +37,8 @@ tests: # Use non-default QEMU gdbstub port 1235 for this test to avoid conflicts # with some other test on QEMU running in parallel. debug.gdbstub_qemu.breakpoints: - platform_allow: qemu_x86 + platform_allow: + - qemu_x86 harness: pytest harness_config: pytest_root: @@ -45,9 +50,6 @@ tests: - "test_breakpoints.gdbinit" - "--gdb_target_remote" - "tcp::1235" - tags: - - debug - - gdbstub extra_configs: # Turn off Zephyr's gdbstub for this test case. - CONFIG_GDBSTUB=n