From 2b779fc5a968fc94b1f6d75bf31ee3a8e04ef54c Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Wed, 13 Dec 2023 20:54:49 +0100 Subject: [PATCH] native: only set TERMFLAGS for pyterm If TERMPROG is unset the default is pyterm. If TERMPROG is pyterm we need to set the native flag. --- boards/native/Makefile.include | 6 +++++- examples/gnrc_border_router/Makefile.native.conf | 1 + makefiles/tools/serial.inc.mk | 2 ++ tests/core/sched_change_priority/Makefile | 3 --- tests/net/gcoap_dns/Makefile | 3 +++ 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/boards/native/Makefile.include b/boards/native/Makefile.include index 8283cf5cef..adba4b127a 100644 --- a/boards/native/Makefile.include +++ b/boards/native/Makefile.include @@ -14,7 +14,11 @@ RESET ?= $(RIOTBOARD)/native/dist/reset.sh FLASHER ?= FLASHFILE ?= $(ELFFILE) -TERMFLAGS ?= -n $(FLASHFILE) +ifeq (native,$(RIOT_TERMINAL)) + TERMPROG ?= $(FLASHFILE) +else + TERMFLAGS += -n $(FLASHFILE) +endif export VALGRIND ?= valgrind export CGANNOTATE ?= cg_annotate diff --git a/examples/gnrc_border_router/Makefile.native.conf b/examples/gnrc_border_router/Makefile.native.conf index 947424b8bf..83626364cc 100644 --- a/examples/gnrc_border_router/Makefile.native.conf +++ b/examples/gnrc_border_router/Makefile.native.conf @@ -34,6 +34,7 @@ endif # Configure terminal parameters TERMDEPS += host-tools TERMPROG_FLAGS = $(FLAGS_EXTRAS) $(ELFFILE) $(IPV6_PREFIX) +RIOT_TERMINAL ?= native TERMPROG ?= sudo $(RIOTTOOLS)/zep_dispatch/start_network.sh $(TERMPROG_FLAGS) # -z [::1]:$PORT for each ZEP device diff --git a/makefiles/tools/serial.inc.mk b/makefiles/tools/serial.inc.mk index 8389e42167..63fee23abb 100644 --- a/makefiles/tools/serial.inc.mk +++ b/makefiles/tools/serial.inc.mk @@ -80,4 +80,6 @@ else ifeq (${RIOT_TERMINAL},bootterm) TERMPROG = $(RIOTTOOLS)/bootterm/bt TERMFLAGS = $(BOOTTERMFLAGS) -a -b $(BAUD) $(PORT) TERMDEPS += $(TERMPROG) +else ifeq (${RIOT_TERMINAL},native) + TERMPROG ?= $(ELFFILE) endif diff --git a/tests/core/sched_change_priority/Makefile b/tests/core/sched_change_priority/Makefile index 2db2b35102..9ec6a856ed 100644 --- a/tests/core/sched_change_priority/Makefile +++ b/tests/core/sched_change_priority/Makefile @@ -4,9 +4,6 @@ USEMODULE += nice USEMODULE += ps USEMODULE += shell_cmds_default -# Use a terminal that does not introduce extra characters into the stream. -RIOT_TERMINAL ?= socat - APP_SHELL_FMT ?= NONE include $(RIOTBASE)/Makefile.include diff --git a/tests/net/gcoap_dns/Makefile b/tests/net/gcoap_dns/Makefile index e8484c1c7a..48ddb7de57 100644 --- a/tests/net/gcoap_dns/Makefile +++ b/tests/net/gcoap_dns/Makefile @@ -28,6 +28,9 @@ CFLAGS += -DHAS_SOCK_DNS_MOCK=1 include $(RIOTBASE)/Makefile.include ifeq (native,$(BOARD)) +RIOT_TERMINAL=native +TERMPROG=$(ELFFILE) +TERMFLAGS= test: PORT= $(call target-export-variables,test,PORT) endif