diff --git a/tests/sntp/Makefile b/tests/sntp/Makefile new file mode 100644 index 0000000000..c608755c17 --- /dev/null +++ b/tests/sntp/Makefile @@ -0,0 +1,23 @@ +# name of your application +APPLICATION = sntp +include ../Makefile.tests_common + +BOARD_INSUFFICIENT_MEMORY := chronos msb-430 msb-430h nucleo32-f031 \ + nucleo32-f042 nucleo32-l031 nucleo-f030 \ + nucleo-f334 nucleo-l053 stm32f0discovery \ + telosb weio z1 + +USEMODULE += sntp +USEMODULE += gnrc_sock_udp +USEMODULE += gnrc_ipv6_default +USEMODULE += auto_init_gnrc_netif +USEMODULE += gnrc_netdev_default +USEMODULE += shell +USEMODULE += shell_commands + +# Comment this out to disable code in RIOT that does safety checking +# which is not needed in a production environment but helps in the +# development process: +CFLAGS += -DDEVELHELP + +include $(RIOTBASE)/Makefile.include diff --git a/tests/sntp/README.md b/tests/sntp/README.md new file mode 100644 index 0000000000..df5ab283bd --- /dev/null +++ b/tests/sntp/README.md @@ -0,0 +1,6 @@ +About +===== +This test application allows you to type `ntpdate ` and get the current +date + the offset in microseconds of the NTP timestamp (seconds from 1900-01-01) +from the current `xtimer_now_usec64()` back utilizing SNTP. Make sure that +`` is reachable and has an NTP daemon installed. diff --git a/tests/sntp/main.c b/tests/sntp/main.c new file mode 100644 index 0000000000..32edd09376 --- /dev/null +++ b/tests/sntp/main.c @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2017 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 + * @brief Tests sntp module. + * + * @author Martine Lenders + * + * @} + */ + +#include + +#include "shell.h" + +static char line_buf[SHELL_DEFAULT_BUFSIZE]; + +int main(void) +{ + shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE); + return 0; +}