1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests: provide tests for gnrc_ndp2

This commit is contained in:
Martine Lenders 2017-05-12 19:20:03 +02:00
parent 08447ed51e
commit 78474fc917
No known key found for this signature in database
GPG Key ID: 8E97A9FE55F25D62
3 changed files with 1062 additions and 0 deletions

19
tests/gnrc_ndp2/Makefile Normal file
View File

@ -0,0 +1,19 @@
# name of your application
APPLICATION = gnrc_ndp2
include ../Makefile.tests_common
BOARD_INSUFFICIENT_MEMORY := nucleo32-f031 nucleo32-f042
USEMODULE += gnrc_ndp2
USEMODULE += embunit
CFLAGS += -DGNRC_NETTYPE_NDP2=GNRC_NETTYPE_TEST
CFLAGS += -DGNRC_PKTBUF_SIZE=512
CFLAGS += -DTEST_SUITES
include $(RIOTBASE)/Makefile.include
test:
# `testrunner` calls `make term` recursively, results in duplicated `TERMFLAGS`.
# So clears `TERMFLAGS` before run.
TERMFLAGS= tests/01-run.py

1022
tests/gnrc_ndp2/main.c Normal file

File diff suppressed because it is too large Load Diff

21
tests/gnrc_ndp2/tests/01-run.py Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env python3
# Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de>
# Copyright (C) 2016 Takuo Yonezawa <Yonezawa-T2@mail.dnp.co.jp>
#
# 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 os
import sys
sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner'))
import testrunner
def testfunc(child):
# 1st 6LoWPAN fragment
child.expect(r"OK \(\d+ tests\)")
if __name__ == "__main__":
sys.exit(testrunner.run(testfunc))