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 <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This commit is contained in:
Yong Cong Sin 2024-07-23 12:53:01 +08:00 committed by Anas Nashif
commit b97d97ff17

View file

@ -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