1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

examples: tests: update native TERMFLAGS

Updating the Makefiles for example and test applications to set the
TERMFLAGS correctly for native.
This commit is contained in:
Oleg Hahm 2023-12-13 21:13:13 +01:00
parent 2b779fc5a9
commit 99ff9bad03
32 changed files with 54 additions and 29 deletions

View File

@ -70,11 +70,11 @@ USE_ZEP ?= 0
# set the ZEP port for native
ZEP_PORT_BASE ?= 17754
ifeq (1,$(USE_ZEP))
TERMFLAGS += -z [::1]:$(ZEP_PORT_BASE)
TERMFLAGS += --native-args '-z [::1]:$(ZEP_PORT_BASE)'
USEMODULE += socket_zep
ifneq (,$(ZEP_MAC))
TERMFLAGS += --eui64=$(ZEP_MAC)
TERMFLAGS += --native-args '\-\-eui64=$(ZEP_MAC)'
endif
endif

View File

@ -82,11 +82,11 @@ USE_ZEP ?= 0
# set the ZEP port for native
ZEP_PORT_BASE ?= 17754
ifeq (1,$(USE_ZEP))
TERMFLAGS += -z [::1]:$(ZEP_PORT_BASE)
TERMFLAGS += --native-args '-z [::1]:$(ZEP_PORT_BASE)'
USEMODULE += socket_zep
ifneq (,$(ZEP_MAC))
TERMFLAGS += --eui64=$(ZEP_MAC)
TERMFLAGS += --native-args '\-\-eui64=$(ZEP_MAC)'
endif
endif

View File

@ -42,7 +42,7 @@ TERMFLAGS ?= $(patsubst %,-z [::1]:%, $(shell seq $(ZEP_PORT_BASE) $(ZEP_PORT_MA
# set optional ZEP l2 address
ifneq (,$(ZEP_MAC))
TERMFLAGS += --eui64=$(ZEP_MAC)
TERMFLAGS += --native-args '\-\-eui64=$(ZEP_MAC)'
endif
# native uses $PORT to specify the TAP interface

View File

@ -47,11 +47,11 @@ USE_ZEP ?= 0
# set the ZEP port for native
ZEP_PORT_BASE ?= 17754
ifeq (1,$(USE_ZEP))
TERMFLAGS += -z [::1]:$(ZEP_PORT_BASE)
TERMFLAGS += --native-args '-z [::1]:$(ZEP_PORT_BASE)'
USEMODULE += socket_zep
ifneq (,$(ZEP_MAC))
TERMFLAGS += --eui64=$(ZEP_MAC)
TERMFLAGS += --native-args '\-\-eui64=$(ZEP_MAC)'
endif
endif

View File

@ -6,7 +6,7 @@ export TAP ?= tap0
# use Ethernet as link-layer protocol
ifeq (native,$(BOARD))
TERMFLAGS ?= $(TAP)
PORT += $(TAP)
else
ETHOS_BAUDRATE ?= 115200
CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE)

View File

@ -37,7 +37,7 @@ ifeq (native, $(BOARD))
USEMODULE += socket_zep
USEMODULE += socket_zep_hello
USEMODULE += netdev
TERMFLAGS += -z 127.0.0.1:17754 # Murdock has no IPv6 support
TERMFLAGS += --native-args '-z 127.0.0.1:17754' # Murdock has no IPv6 support
# make sure each instance gets their own fs
CFLAGS += -DCONFIG_NATIVE_ISOLATE_FS=1
else

View File

@ -15,7 +15,7 @@ USEMODULE += shell_cmds_default
# use Ethernet as link-layer protocol
ifeq (native,$(BOARD))
TERMFLAGS += -z [::1]:17754
TERMFLAGS += --native-args '-z [::1]:17754'
else
ETHOS_BAUDRATE ?= 115200
CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE)

View File

@ -12,7 +12,7 @@ USEMODULE += gnrc_netif_single # Only one interface used and it makes
# use Ethernet as link-layer protocol
ifeq (native,$(BOARD))
TERMFLAGS ?= $(TAP)
PORT ?= $(TAP)
else
ETHOS_BAUDRATE ?= 115200
CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE)

View File

@ -6,7 +6,7 @@ export TAP ?= tap0
# use Ethernet as link-layer protocol
ifeq (native,$(BOARD))
TERMFLAGS ?= $(TAP)
PORT ?= $(TAP)
else
ETHOS_BAUDRATE ?= 115200
CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE)

View File

@ -8,7 +8,7 @@ CFLAGS += -DOUTPUT=TEXT
CFLAGS += -DTEST_SUITES="gnrc_ipv6_ext_frag"
ifeq (native,$(BOARD))
TERMFLAGS ?= $(TAP)
PORT ?= $(TAP)
else
ETHOS_BAUDRATE ?= 115200
CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE)

View File

@ -6,7 +6,7 @@ export TAP ?= tap0
# use Ethernet as link-layer protocol
ifeq (native,$(BOARD))
TERMFLAGS ?= $(TAP)
PORT ?= $(TAP)
else
ETHOS_BAUDRATE ?= 115200
CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE)

View File

@ -10,7 +10,7 @@ USEMODULE += gnrc_ipv6_default
USEMODULE += gnrc_ipv6_nib_dns
# use Ethernet as link-layer protocol
ifeq (native,$(BOARD))
TERMFLAGS ?= $(TAP)
PORT ?= $(TAP)
else
ETHOS_BAUDRATE ?= 115200
CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE)

View File

@ -4,7 +4,7 @@ include ../Makefile.net_common
ifeq (native, $(BOARD))
USEMODULE += socket_zep
TERMFLAGS ?= -z "0.0.0.0:17755,localhost:17754"
TERMFLAGS ?= --native-args '-z "0.0.0.0:17755,localhost:17754"'
USEMODULE += netdev
# somehow this breaks the test
DISABLE_MODULE += test_utils_print_stack_usage

View File

@ -13,7 +13,7 @@ ifeq (native, $(BOARD))
USEMODULE += socket_zep
USEMODULE += socket_zep_hello
USEMODULE += netdev
TERMFLAGS += -z 127.0.0.1:17754 # Murdock has no IPv6 support
TERMFLAGS += --native-args '-z 127.0.0.1:17754' # Murdock has no IPv6 support
else
USEMODULE += netdev_default
# automated test only works on native

View File

@ -8,7 +8,7 @@ CFLAGS += -DOUTPUT=TEXT
# use Ethernet as link-layer protocol
ifeq (native,$(BOARD))
TERMFLAGS ?= $(TAP)
PORT ?= $(TAP)
else
ETHOS_BAUDRATE ?= 115200
CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE)

View File

@ -28,7 +28,7 @@ ifeq (native, $(BOARD))
USEMODULE += socket_zep
USEMODULE += socket_zep_hello
USEMODULE += netdev
TERMFLAGS = -z 127.0.0.1:17754 # Murdock has no IPv6 support
TERMFLAGS = --native-args '-z 127.0.0.1:17754' # Murdock has no IPv6 support
else
USEMODULE += netdev_default
# automated test only works on native

View File

@ -11,7 +11,7 @@ USEMODULE += gnrc_netif_single # Only one interface used and it makes
# shell commands easier
# use Ethernet as link-layer protocol
ifeq (native,$(BOARD))
TERMFLAGS ?= $(TAP)
PORT ?= $(TAP)
else
ETHOS_BAUDRATE ?= 115200
CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE)

View File

@ -21,7 +21,7 @@ USEPKG += tinydtls
# use Ethernet as link-layer protocol
ifeq (native,$(BOARD))
TERMFLAGS ?= $(TAP)
PORT ?= $(TAP)
else
ETHOS_BAUDRATE ?= 115200
CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE)

View File

@ -13,7 +13,7 @@ TIMEOUT_MS ?= 3000
TEST_ON_CI_BLACKLIST += all
ifeq (native,$(BOARD))
TERMFLAGS ?= $(TAP)
PORT ?= $(TAP)
else
ETHOS_BAUDRATE ?= 115200
CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE)

View File

@ -18,7 +18,7 @@ CUSTOM_GNRC_TCP_NO_TIMEOUT ?= 1
TEST_ON_CI_BLACKLIST += all
ifeq (native,$(BOARD))
TERMFLAGS ?= $(TAP)
PORT ?= $(TAP)
else
ETHOS_BAUDRATE ?= 115200
CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE)

View File

@ -27,7 +27,7 @@ BOARD_WHITELIST += adafruit-clue \
ifeq ($(BOARD), native)
ZEP_PORT_BASE ?= 17754
TERMFLAGS += -z [::1]:$(ZEP_PORT_BASE)
TERMFLAGS += --native-args '-z [::1]:$(ZEP_PORT_BASE)'
USEMODULE += socket_zep
# the same for Kconfig
ifeq (1,$(TEST_KCONFIG))

View File

@ -40,7 +40,7 @@ USEMODULE += ztimer_usec
ifeq ($(BOARD), native)
ZEP_PORT_BASE ?= 17754
TERMFLAGS += -z [::1]:$(ZEP_PORT_BASE)
TERMFLAGS += --native-args '-z [::1]:$(ZEP_PORT_BASE)'
USEMODULE += socket_zep
endif

View File

@ -6,6 +6,6 @@ USEMODULE += od
USEMODULE += socket_zep
USEMODULE += netdev
TERMFLAGS ?= -z [::1]:17754
TERMFLAGS ?= --native-args '-z [::1]:17754'
include $(RIOTBASE)/Makefile.include

View File

@ -51,9 +51,9 @@ def testfunc(child):
if __name__ == "__main__":
os.environ['TERMFLAGS'] = "--eui64=00:5a:45:50:0a:00:30:38 -z [%s]:%d,[%s]:%d" % (
zep_params['local_addr'], zep_params['local_port'],
zep_params['remote_addr'], zep_params['remote_port'])
os.environ['TERMFLAGS'] = "--native-args '\\-\\-eui64=00:5a:45:50:0a:00:30:38' --native-args '-z [%s]:%d,[%s]:%d'"\
% (zep_params['local_addr'], zep_params['local_port'],
zep_params['remote_addr'], zep_params['remote_port'])
s = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM)
s.bind(("127.0.0.1", zep_params['remote_port']))
res = run(testfunc, timeout=1, echo=True, traceback=True)

View File

@ -6,6 +6,9 @@ USEMODULE += xtimer
FEATURES_REQUIRED += periph_rtt
DISABLE_MODULE += periph_init_rtt
ifeq (native, $(BOARD))
RIOT_TERMINAL ?= native
endif
RIOT_TERMINAL ?= socat
# microbit qemu lacks rtt

View File

@ -5,6 +5,10 @@ USEMODULE += shell_democommands
FEATURES_REQUIRED += rust_target
ifeq (native, $(BOARD))
RIOT_TERMINAL ?= native
endif
# Testing on stable to ensure that no nightly features are needed when Rust is
# pulled in through modules.
CARGO_CHANNEL = stable

View File

@ -7,6 +7,9 @@ USEMODULE += shell_cmds_default
INCLUDES += -I$(CURDIR)
ifeq (native, $(BOARD))
RIOT_TERMINAL ?= native
endif
# Use a terminal that does not introduce extra characters into the stream.
RIOT_TERMINAL ?= socat

View File

@ -7,6 +7,9 @@ USEMODULE += shell_cmds_default
INCLUDES += -I$(CURDIR)
ifeq (native, $(BOARD))
RIOT_TERMINAL ?= native
endif
# Use a terminal that does not introduce extra characters into the stream.
RIOT_TERMINAL ?= socat

View File

@ -5,6 +5,9 @@ USEMODULE += app_metadata
USEMODULE += shell_cmds_default
USEMODULE += ps
ifeq (native, $(BOARD))
RIOT_TERMINAL ?= native
endif
# Use a terminal that does not introduce extra characters into the stream.
RIOT_TERMINAL ?= socat

View File

@ -14,6 +14,9 @@ TESTRUNNER_SHELL_SKIP_REBOOT = 1
TESTRUNNER_RESET_BOARD_ON_STARTUP = 0
ifneq (,$(filter term,$(MAKECMDGOALS)))
ifeq (native, $(BOARD))
RIOT_TERMINAL ?= native
endif
# Use a terminal that does not introduce extra characters into the stream.
RIOT_TERMINAL ?= socat
else ifneq (,$(filter test,$(MAKECMDGOALS)))

View File

@ -19,6 +19,8 @@ DISABLE_MODULE += test_utils_interactive_sync_shell
# for z1, socat doesn't work (unknown reason)
ifeq (z1, $(BOARD))
RIOT_TERMINAL ?= pyterm
else ifeq (native, $(BOARD))
RIOT_TERMINAL ?= native
endif
# Use a terminal that does not introduce extra characters into the stream.

View File

@ -3,6 +3,10 @@ include ../Makefile.tests_common
USEMODULE += test_utils_result_output
USEMODULE += shell
ifeq (native, $(BOARD))
RIOT_TERMINAL ?= native
endif
# Use a terminal that does not introduce extra characters into the stream.
RIOT_TERMINAL ?= socat