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:
parent
08447ed51e
commit
78474fc917
19
tests/gnrc_ndp2/Makefile
Normal file
19
tests/gnrc_ndp2/Makefile
Normal 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
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
21
tests/gnrc_ndp2/tests/01-run.py
Executable 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))
|
Loading…
Reference in New Issue
Block a user