Commit c9e651b1 authored by Dmitrii Golovanov's avatar Dmitrii Golovanov Committed by Carles Cufi
Browse files

tests: samples: gdbstub: make test out of the sample



Clone samples/subsys/debug/gdbstub to tests and convert it back
to a build-only sample aligned with documentation.

Signed-off-by: default avatarDmitrii Golovanov <dmitrii.golovanov@intel.com>
parent 65501061
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8,8 +8,8 @@ sample:
  name: gdbstub sample
tests:
  sample.debug.gdbstub:
    build_only: true
    platform_allow: qemu_x86
    harness: pytest
    tags:
      - debug
      - gdbstub
+12 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)

if(BOARD MATCHES "qemu_x86")
  list(APPEND QEMU_EXTRA_FLAGS -serial tcp:127.0.0.1:5678,server)
endif()

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(debug_gdbstub)

target_sources(app PRIVATE src/main.c)
+7 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: Apache-2.0 */

/ {
	chosen {
		zephyr,gdbstub-uart = &uart1;
	};
};
+4 −0
Original line number Diff line number Diff line
CONFIG_GDBSTUB=y
CONFIG_NO_OPTIMIZATIONS=y
CONFIG_USERSPACE=y
CONFIG_KOBJECT_TEXT_AREA=4096
Loading