diff --git a/examples/microcoap_server/Makefile b/tests/pkg_microcoap/Makefile similarity index 60% rename from examples/microcoap_server/Makefile rename to tests/pkg_microcoap/Makefile index f34d00ba6..fce28cfba 100644 --- a/examples/microcoap_server/Makefile +++ b/tests/pkg_microcoap/Makefile @@ -1,11 +1,5 @@ -# name of your application -APPLICATION = microcoap_server - -# If no BOARD is found in the environment, use this default: -BOARD ?= native - -# This has to be the absolute path to the RIOT base directory: -RIOTBASE ?= $(CURDIR)/../.. +APPLICATION = pkg_microcoap +include ../Makefile.tests_common BOARD_INSUFFICIENT_MEMORY := chronos msb-430 msb-430h nucleo32-f031 nucleo32-f042 \ nucleo32-l031 nucleo-f030 nucleo-l053 pca10000 pca10005 \ @@ -25,7 +19,6 @@ USEMODULE += gnrc_icmpv6_echo USEMODULE += gnrc_sock_udp USEPKG += microcoap -CFLAGS += -DMICROCOAP_DEBUG # include this for printing IP addresses USEMODULE += shell_commands @@ -47,21 +40,4 @@ ifneq (,$(filter $(BOARD),$(LOW_MEMORY_BOARDS))) USEMODULE += prng_minstd endif -# Change this to 0 show compiler invocation lines by default: -QUIET ?= 1 - include $(RIOTBASE)/Makefile.include - -# Set a custom channel if needed -ifneq (,$(filter cc110x,$(USEMODULE))) # radio is cc110x sub-GHz - DEFAULT_CHANNEL ?= 0 - CFLAGS += -DCC110X_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL) -else - ifneq (,$(filter at86rf212b,$(USEMODULE))) # radio is IEEE 802.15.4 sub-GHz - DEFAULT_CHANNEL ?= 5 - CFLAGS += -DIEEE802154_DEFAULT_SUBGHZ_CHANNEL=$(DEFAULT_CHANNEL) - else # radio is IEEE 802.15.4 2.4 GHz - DEFAULT_CHANNEL ?= 26 - CFLAGS += -DIEEE802154_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL) - endif -endif diff --git a/examples/microcoap_server/README.md b/tests/pkg_microcoap/README.md similarity index 96% rename from examples/microcoap_server/README.md rename to tests/pkg_microcoap/README.md index aa5304132..89be63dc2 100644 --- a/examples/microcoap_server/README.md +++ b/tests/pkg_microcoap/README.md @@ -1,8 +1,8 @@ -microcoap server example -======================== +microcoap server test +===================== -This application is meant to get you started with implementing a CoAP server on RIOT. -It uses the GNRC network stack through RIOT's conn socket API. +This application is meant to get you started with implementing a CoAP server +on RIOT. It uses the GNRC network stack through RIOT's conn socket API. Usage ===== diff --git a/examples/microcoap_server/coap.c b/tests/pkg_microcoap/coap.c similarity index 100% rename from examples/microcoap_server/coap.c rename to tests/pkg_microcoap/coap.c diff --git a/examples/microcoap_server/main.c b/tests/pkg_microcoap/main.c similarity index 86% rename from examples/microcoap_server/main.c rename to tests/pkg_microcoap/main.c index 38e0d3b9c..73c58d876 100644 --- a/examples/microcoap_server/main.c +++ b/tests/pkg_microcoap/main.c @@ -7,11 +7,11 @@ */ /** - * @ingroup examples + * @ingroup tests * @{ * * @file - * @brief CoAP example server application (using microcoap) + * @brief CoAP test server application (using microcoap) * * @author Kaspar Schleiser * @} @@ -28,7 +28,7 @@ extern int _netif_config(int argc, char **argv); int main(void) { - puts("RIOT microcoap example application"); + puts("RIOT microcoap test application"); puts("Waiting for address autoconfiguration..."); xtimer_sleep(3); diff --git a/examples/microcoap_server/microcoap_sock.c b/tests/pkg_microcoap/microcoap_sock.c similarity index 97% rename from examples/microcoap_server/microcoap_sock.c rename to tests/pkg_microcoap/microcoap_sock.c index 3c989de73..d3abdb61e 100644 --- a/examples/microcoap_server/microcoap_sock.c +++ b/tests/pkg_microcoap/microcoap_sock.c @@ -9,11 +9,7 @@ #include "net/af.h" #include "net/sock/udp.h" -#ifdef MICROCOAP_DEBUG -#define ENABLE_DEBUG (1) -#else #define ENABLE_DEBUG (0) -#endif #include "debug.h" #include "coap.h"