diff --git a/boards/native/Makefile.include b/boards/native/Makefile.include index adba4b127a..a9d4e54643 100644 --- a/boards/native/Makefile.include +++ b/boards/native/Makefile.include @@ -18,6 +18,14 @@ ifeq (native,$(RIOT_TERMINAL)) TERMPROG ?= $(FLASHFILE) else TERMFLAGS += -n $(FLASHFILE) + ifeq (1,$(USE_ZEP)) + ZEP_IP ?= [::1] + ZEP_PORT_BASE ?= 17754 + TERMFLAGS += --native-args '-z $(ZEP_IP):$(ZEP_PORT_BASE)' + endif + ifneq (,$(ZEP_MAC)) + TERMFLAGS += --native-args '\-\-eui64=$(ZEP_MAC)' + endif endif export VALGRIND ?= valgrind @@ -92,9 +100,7 @@ endif LINKFLAGS += -ffunction-sections # set the tap interface for term/valgrind -ifneq (,$(filter netdev_tap,$(USEMODULE))) - PORT ?= tap0 -endif +PORT ?= tap0 # Configure default eeprom file EEPROM_FILE ?= $(BINDIR)/native.eeprom diff --git a/examples/gcoap/Makefile b/examples/gcoap/Makefile index b6b8f4fc19..93bfc25e1b 100644 --- a/examples/gcoap/Makefile +++ b/examples/gcoap/Makefile @@ -70,12 +70,7 @@ USE_ZEP ?= 0 # set the ZEP port for native ZEP_PORT_BASE ?= 17754 ifeq (1,$(USE_ZEP)) - TERMFLAGS += --native-args '-z [::1]:$(ZEP_PORT_BASE)' USEMODULE += socket_zep - - ifneq (,$(ZEP_MAC)) - TERMFLAGS += --native-args '\-\-eui64=$(ZEP_MAC)' - endif endif include $(RIOTBASE)/Makefile.include diff --git a/examples/gcoap_dtls/Makefile b/examples/gcoap_dtls/Makefile index 647be9722a..ce1ee3396b 100644 --- a/examples/gcoap_dtls/Makefile +++ b/examples/gcoap_dtls/Makefile @@ -82,12 +82,7 @@ USE_ZEP ?= 0 # set the ZEP port for native ZEP_PORT_BASE ?= 17754 ifeq (1,$(USE_ZEP)) - TERMFLAGS += --native-args '-z [::1]:$(ZEP_PORT_BASE)' USEMODULE += socket_zep - - ifneq (,$(ZEP_MAC)) - TERMFLAGS += --native-args '\-\-eui64=$(ZEP_MAC)' - endif endif include $(RIOTBASE)/Makefile.include diff --git a/examples/gnrc_border_router/Makefile.native.conf b/examples/gnrc_border_router/Makefile.native.conf index 33279499dd..4c15e517c2 100644 --- a/examples/gnrc_border_router/Makefile.native.conf +++ b/examples/gnrc_border_router/Makefile.native.conf @@ -40,10 +40,5 @@ TERMPROG ?= sudo $(RIOTTOOLS)/zep_dispatch/start_network.sh $(TERMPROG_FLAGS) # -z [::1]:$PORT for each ZEP device TERMFLAGS ?= $(patsubst %,-z [::1]:%, $(shell seq $(ZEP_PORT_BASE) $(ZEP_PORT_MAX))) -# set optional ZEP l2 address -ifneq (,$(ZEP_MAC)) - TERMFLAGS += --native-args '\-\-eui64=$(ZEP_MAC)' -endif - # native uses $PORT to specify the TAP interface PORT ?= $(TAP) diff --git a/examples/gnrc_networking/Makefile b/examples/gnrc_networking/Makefile index 4eb45bdb51..e31b39635e 100644 --- a/examples/gnrc_networking/Makefile +++ b/examples/gnrc_networking/Makefile @@ -47,12 +47,7 @@ USE_ZEP ?= 0 # set the ZEP port for native ZEP_PORT_BASE ?= 17754 ifeq (1,$(USE_ZEP)) - TERMFLAGS += --native-args '-z [::1]:$(ZEP_PORT_BASE)' USEMODULE += socket_zep - - ifneq (,$(ZEP_MAC)) - TERMFLAGS += --native-args '\-\-eui64=$(ZEP_MAC)' - endif endif # Uncomment the following 2 lines to specify static link lokal IPv6 address diff --git a/tests/net/emcute/Makefile b/tests/net/emcute/Makefile index c37c516072..65d2f98e69 100644 --- a/tests/net/emcute/Makefile +++ b/tests/net/emcute/Makefile @@ -6,7 +6,7 @@ export TAP ?= tap0 # use Ethernet as link-layer protocol ifeq (native,$(BOARD)) - PORT += $(TAP) + PORT ?= $(TAP) else ETHOS_BAUDRATE ?= 115200 CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE) diff --git a/tests/net/gcoap_fileserver/Makefile b/tests/net/gcoap_fileserver/Makefile index e3bcdbb10d..ad5900aa1b 100644 --- a/tests/net/gcoap_fileserver/Makefile +++ b/tests/net/gcoap_fileserver/Makefile @@ -37,7 +37,8 @@ ifeq (native, $(BOARD)) USEMODULE += socket_zep USEMODULE += socket_zep_hello USEMODULE += netdev - TERMFLAGS += --native-args '-z 127.0.0.1:17754' # Murdock has no IPv6 support + RIOT_TERMINAL = native + TERMFLAGS += -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 diff --git a/tests/net/gnrc_dhcpv6_client_6lbr/Makefile b/tests/net/gnrc_dhcpv6_client_6lbr/Makefile index bb1f054892..e9e6bb8006 100644 --- a/tests/net/gnrc_dhcpv6_client_6lbr/Makefile +++ b/tests/net/gnrc_dhcpv6_client_6lbr/Makefile @@ -15,7 +15,8 @@ USEMODULE += shell_cmds_default # use Ethernet as link-layer protocol ifeq (native,$(BOARD)) - TERMFLAGS += --native-args '-z [::1]:17754' + RIOT_TERMINAL = native + TERMFLAGS += -z [::1]:17754 else ETHOS_BAUDRATE ?= 115200 CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE) diff --git a/tests/net/gnrc_netif_ieee802154/Makefile b/tests/net/gnrc_netif_ieee802154/Makefile index 84b8d763ef..bce4d0cb12 100644 --- a/tests/net/gnrc_netif_ieee802154/Makefile +++ b/tests/net/gnrc_netif_ieee802154/Makefile @@ -4,7 +4,8 @@ include ../Makefile.net_common ifeq (native, $(BOARD)) USEMODULE += socket_zep - TERMFLAGS ?= --native-args '-z "0.0.0.0:17755,localhost:17754"' + RIOT_TERMINAL = native + TERMFLAGS ?= -z "0.0.0.0:17755,localhost:17754" USEMODULE += netdev # somehow this breaks the test DISABLE_MODULE += test_utils_print_stack_usage diff --git a/tests/net/gnrc_rpl/Makefile b/tests/net/gnrc_rpl/Makefile index d8778e5a8a..29713f7099 100644 --- a/tests/net/gnrc_rpl/Makefile +++ b/tests/net/gnrc_rpl/Makefile @@ -13,7 +13,8 @@ ifeq (native, $(BOARD)) USEMODULE += socket_zep USEMODULE += socket_zep_hello USEMODULE += netdev - TERMFLAGS += --native-args '-z 127.0.0.1:17754' # Murdock has no IPv6 support + RIOT_TERMINAL = native + TERMFLAGS += -z 127.0.0.1:17754 # Murdock has no IPv6 support else USEMODULE += netdev_default # automated test only works on native diff --git a/tests/net/gnrc_sixlowpan_frag_sfr_congure_impl/Makefile b/tests/net/gnrc_sixlowpan_frag_sfr_congure_impl/Makefile index 10e868266a..0a07d7f40f 100644 --- a/tests/net/gnrc_sixlowpan_frag_sfr_congure_impl/Makefile +++ b/tests/net/gnrc_sixlowpan_frag_sfr_congure_impl/Makefile @@ -28,7 +28,8 @@ ifeq (native, $(BOARD)) USEMODULE += socket_zep USEMODULE += socket_zep_hello USEMODULE += netdev - TERMFLAGS = --native-args '-z 127.0.0.1:17754' # Murdock has no IPv6 support + RIOT_TERMINAL = native + TERMFLAGS = -z 127.0.0.1:17754 # Murdock has no IPv6 support else USEMODULE += netdev_default # automated test only works on native diff --git a/tests/net/ieee802154_hal/Makefile b/tests/net/ieee802154_hal/Makefile index 4233ca6a96..96c43d42eb 100644 --- a/tests/net/ieee802154_hal/Makefile +++ b/tests/net/ieee802154_hal/Makefile @@ -27,7 +27,8 @@ BOARD_WHITELIST += adafruit-clue \ ifeq ($(BOARD), native) ZEP_PORT_BASE ?= 17754 - TERMFLAGS += --native-args '-z [::1]:$(ZEP_PORT_BASE)' + RIOT_TERMINAL = native + TERMFLAGS += -z [::1]:$(ZEP_PORT_BASE) USEMODULE += socket_zep # the same for Kconfig ifeq (1,$(TEST_KCONFIG)) diff --git a/tests/net/ieee802154_submac/Makefile b/tests/net/ieee802154_submac/Makefile index 688294937d..e4122afbc0 100644 --- a/tests/net/ieee802154_submac/Makefile +++ b/tests/net/ieee802154_submac/Makefile @@ -39,8 +39,7 @@ USEMODULE += ieee802154_submac USEMODULE += ztimer_usec ifeq ($(BOARD), native) - ZEP_PORT_BASE ?= 17754 - TERMFLAGS += --native-args '-z [::1]:$(ZEP_PORT_BASE)' + USE_ZEP = 1 USEMODULE += socket_zep endif diff --git a/tests/net/socket_zep/Makefile b/tests/net/socket_zep/Makefile index 7bb9d945f9..68dfb8d1e9 100644 --- a/tests/net/socket_zep/Makefile +++ b/tests/net/socket_zep/Makefile @@ -6,6 +6,7 @@ USEMODULE += od USEMODULE += socket_zep USEMODULE += netdev -TERMFLAGS ?= --native-args '-z [::1]:17754' +RIOT_TERMINAL = native +TERMFLAGS ?= -z [::1]:17754 include $(RIOTBASE)/Makefile.include diff --git a/tests/net/socket_zep/tests/01-run.py b/tests/net/socket_zep/tests/01-run.py index 1d4e4ca8fe..b72f66137b 100755 --- a/tests/net/socket_zep/tests/01-run.py +++ b/tests/net/socket_zep/tests/01-run.py @@ -51,9 +51,9 @@ def testfunc(child): if __name__ == "__main__": - 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']) + 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']) 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) diff --git a/tests/sys/shell_coreclk/Makefile b/tests/sys/shell_coreclk/Makefile index 6e26e314be..9090db37c2 100644 --- a/tests/sys/shell_coreclk/Makefile +++ b/tests/sys/shell_coreclk/Makefile @@ -3,10 +3,4 @@ include ../Makefile.sys_common USEMODULE += shell USEMODULE += shell_cmd_coreclk -# Use a terminal that does not introduce extra characters into the stream. -RIOT_TERMINAL ?= socat - include $(RIOTBASE)/Makefile.include - -# the test script skips tests if socat is not used -$(call target-export-variables,$(RIOT_TERMINAL),RIOT_TERMINAL)