2019-07-29 16:27:43 +02:00
|
|
|
include ../Makefile.tests_common
|
|
|
|
|
|
|
|
# Basic Configuration
|
|
|
|
BOARD ?= native
|
|
|
|
TAP ?= tap0
|
|
|
|
|
|
|
|
# Shorten default TCP timeouts to speedup testing
|
2020-07-12 08:22:16 +02:00
|
|
|
MSL_MS ?= 1000
|
|
|
|
TIMEOUT_MS ?= 3000
|
2019-07-29 16:27:43 +02:00
|
|
|
|
|
|
|
# This test depends on tap device setup (only allowed by root)
|
|
|
|
# Suppress test execution to avoid CI errors
|
|
|
|
TEST_ON_CI_BLACKLIST += all
|
|
|
|
|
|
|
|
ifeq (native,$(BOARD))
|
|
|
|
TERMFLAGS ?= $(TAP)
|
|
|
|
else
|
|
|
|
ETHOS_BAUDRATE ?= 115200
|
|
|
|
CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE)
|
|
|
|
TERMDEPS += ethos
|
|
|
|
TERMPROG ?= sudo $(RIOTTOOLS)/ethos/ethos
|
|
|
|
TERMFLAGS ?= $(TAP) $(PORT) $(ETHOS_BAUDRATE)
|
|
|
|
endif
|
|
|
|
|
|
|
|
USEMODULE += auto_init_gnrc_netif
|
|
|
|
USEMODULE += gnrc_ipv6_default
|
|
|
|
USEMODULE += gnrc_tcp
|
|
|
|
USEMODULE += gnrc_pktbuf_cmd
|
2020-07-28 12:06:17 +02:00
|
|
|
USEMODULE += gnrc_netif_single # Only one interface used and it makes
|
|
|
|
# shell commands easier
|
2019-07-29 16:27:43 +02:00
|
|
|
USEMODULE += shell
|
|
|
|
USEMODULE += shell_commands
|
|
|
|
USEMODULE += od
|
|
|
|
|
|
|
|
# Export used tap device to environment
|
|
|
|
export TAPDEV = $(TAP)
|
|
|
|
|
|
|
|
.PHONY: ethos
|
|
|
|
|
|
|
|
ethos:
|
2020-07-03 11:17:57 +02:00
|
|
|
$(Q)env -u CC -u CFLAGS $(MAKE) -C $(RIOTTOOLS)/ethos
|
2019-07-29 16:27:43 +02:00
|
|
|
|
|
|
|
include $(RIOTBASE)/Makefile.include
|
2020-05-23 19:52:37 +02:00
|
|
|
|
|
|
|
# Set CONFIG_GNRC_TCP_MSL via CFLAGS if not being set via Kconfig
|
2020-07-12 08:22:16 +02:00
|
|
|
ifndef CONFIG_GNRC_TCP_MSL_MS
|
|
|
|
CFLAGS += -DCONFIG_GNRC_TCP_MSL_MS=$(MSL_MS)
|
2020-05-23 19:52:37 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Set CONFIG_GNRC_TCP_CONNECTION_TIMEOUT_DURATION via CFLAGS if not being set
|
|
|
|
# via Kconfig
|
2020-07-12 08:22:16 +02:00
|
|
|
ifndef CONFIG_GNRC_TCP_CONNECTION_TIMEOUT_DURATION_MS
|
|
|
|
CFLAGS += -DCONFIG_GNRC_TCP_CONNECTION_TIMEOUT_DURATION_MS=$(TIMEOUT_MS)
|
2020-05-23 19:52:37 +02:00
|
|
|
endif
|
2021-02-04 12:46:26 +01:00
|
|
|
|
|
|
|
# Set the shell echo configuration via CFLAGS if not being controlled via Kconfig
|
|
|
|
ifndef CONFIG_KCONFIG_USEMODULE_SHELL
|
|
|
|
CFLAGS += -DCONFIG_SHELL_NO_ECHO
|
|
|
|
endif
|