diff --git a/tests/gnrc_sixlowpan_frag_sfr_congure_impl/Makefile b/tests/gnrc_sixlowpan_frag_sfr_congure_impl/Makefile new file mode 100644 index 0000000000000..df76c6d5a7147 --- /dev/null +++ b/tests/gnrc_sixlowpan_frag_sfr_congure_impl/Makefile @@ -0,0 +1,31 @@ +include ../Makefile.tests_common + +USEMODULE += netdev_default +USEMODULE += auto_init_gnrc_netif +USEMODULE += gnrc_ipv6_router_default +USEMODULE += gnrc_sixlowpan_frag_sfr +USEMODULE += gnrc_udp +USEMODULE += gnrc_rpl +USEMODULE += auto_init_gnrc_rpl +USEMODULE += gnrc_pktdump +USEMODULE += gnrc_icmpv6_echo +USEMODULE += shell +USEMODULE += shell_cmd_gnrc_pktbuf +USEMODULE += shell_cmd_gnrc_udp +USEMODULE += ps +USEMODULE += netstats_l2 +USEMODULE += netstats_ipv6 +USEMODULE += netstats_rpl + +CONGURE_IMPL ?= congure_sfr + +ifeq (congure_sfr,$(CONGURE_IMPL)) + USEMODULE += gnrc_sixlowpan_frag_sfr_congure_sfr +else + $(error "Unknown CongURE implementation `$(CONGURE_IMPL)`") +endif + +include $(RIOTBASE)/Makefile.include + +# Set a custom channel if needed +include $(RIOTMAKE)/default-radio-settings.inc.mk diff --git a/tests/gnrc_sixlowpan_frag_sfr_congure_impl/Makefile.ci b/tests/gnrc_sixlowpan_frag_sfr_congure_impl/Makefile.ci new file mode 100644 index 0000000000000..abc9c96bc03eb --- /dev/null +++ b/tests/gnrc_sixlowpan_frag_sfr_congure_impl/Makefile.ci @@ -0,0 +1,54 @@ +BOARD_INSUFFICIENT_MEMORY := \ + airfy-beacon \ + arduino-duemilanove \ + arduino-leonardo \ + arduino-mega2560 \ + arduino-nano \ + arduino-uno \ + atmega1284p \ + atmega328p \ + atmega328p-xplained-mini \ + atxmega-a3bu-xplained \ + b-l072z-lrwan1 \ + blackpill-128kib \ + bluepill-128kib \ + bluepill-stm32f030c8 \ + calliope-mini \ + derfmega128 \ + hifive1 \ + hifive1b \ + i-nucleo-lrwan1 \ + im880b \ + lsn50 \ + mega-xplained \ + microbit \ + microduino-corerf \ + msb-430 \ + msb-430h \ + nrf51dongle \ + nrf6310 \ + nucleo-f030r8 \ + nucleo-f031k6 \ + nucleo-f042k6 \ + nucleo-f070rb \ + nucleo-f072rb \ + nucleo-f303k8 \ + nucleo-f334r8 \ + nucleo-l011k4 \ + nucleo-l031k6 \ + nucleo-l053r8 \ + samd10-xmini \ + saml10-xpro \ + saml11-xpro \ + slstk3400a \ + stk3200 \ + stm32f030f4-demo \ + stm32f0discovery \ + stm32g0316-disco \ + stm32l0538-disco \ + telosb \ + waspmote-pro \ + yunjia-nrf51822 \ + z1 \ + zigduino \ + # diff --git a/tests/gnrc_sixlowpan_frag_sfr_congure_impl/README.md b/tests/gnrc_sixlowpan_frag_sfr_congure_impl/README.md new file mode 100644 index 0000000000000..d7c4cabed319d --- /dev/null +++ b/tests/gnrc_sixlowpan_frag_sfr_congure_impl/README.md @@ -0,0 +1,8 @@ +SFR CongURE implementation test +=============================== +This test is largely based on the [`gnrc_networking`][1] example but is changed +so SFR with different CongURE implementations can be tested. When `CONGURE_IMPL` +is not set in the environment, `gnrc_sixlowpan_frag_sfr_congure_sfr` is used, +other implementations can be used with `congure_`. + +[1]: https://github.com/RIOT-OS/RIOT/tree/master/examples/gnrc_networking diff --git a/tests/gnrc_sixlowpan_frag_sfr_congure_impl/main.c b/tests/gnrc_sixlowpan_frag_sfr_congure_impl/main.c new file mode 100644 index 0000000000000..843d7968a9738 --- /dev/null +++ b/tests/gnrc_sixlowpan_frag_sfr_congure_impl/main.c @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2015-21 Freie Universität Berlin + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup tests + * @{ + * + * @file + * + * @author Hauke Petersen + * @author Martine Lenders + * + * @} + */ + +#include + +#include "fmt.h" +#include "shell.h" +#include "msg.h" + +#define MAIN_QUEUE_SIZE (8) +static msg_t _main_msg_queue[MAIN_QUEUE_SIZE]; + +int main(void) +{ + msg_init_queue(_main_msg_queue, MAIN_QUEUE_SIZE); + + char line_buf[SHELL_DEFAULT_BUFSIZE]; + shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE); + + /* should be never reached */ + return 0; +} diff --git a/tests/gnrc_sixlowpan_frag_sfr_congure_impl/tests-with-config/01-run.py b/tests/gnrc_sixlowpan_frag_sfr_congure_impl/tests-with-config/01-run.py new file mode 100755 index 0000000000000..e57cd304b03d9 --- /dev/null +++ b/tests/gnrc_sixlowpan_frag_sfr_congure_impl/tests-with-config/01-run.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 + +# Copyright (C) 2021 Freie Universität Berlin +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. + + +import sys +from testrunner import run + + +def testfunc(child): + child.sendline('udp send fe80::1 1337 abcde') + child.expect_exact('Success: sent 5 byte(s) to [fe80::1]:1337') + + +if __name__ == "__main__": + sys.exit(run(testfunc))