tests/cn-cbor: move from unittests to regular test

This moves tests for the cn-cbor package from unittests to a regular
test, which should help to decrease binary size of unittests.
This commit is contained in:
smlng 2018-10-18 08:58:36 +02:00
parent 2a2ef9bbdf
commit 7b0a7db286
5 changed files with 53 additions and 12 deletions

View File

@ -0,0 +1,32 @@
include ../Makefile.tests_common
BOARD_BLACKLIST := arduino-duemilanove \
arduino-mega2560 \
arduino-uno \
chronos \
jiminy-mega256rfr2 \
mega-xplained \
msb-430 \
msb-430h \
telosb \
waspmote-pro \
wsn430-v1_3b \
wsn430-v1_4 \
z1 \
#
USEPKG += cn-cbor
USEMODULE += embunit
USEMODULE += fmt
USEMODULE += memarray
# Tests will fail on platforms <64 bit if not set.
# Workaround for missing overflow detection in cn-cbor.
CFLAGS += -DCBOR_NO_LL
# Skips test cases for floating point data types.
# CFLAGS += -DCBOR_NO_FLOAT
TEST_ON_CI_WHITELIST += all
include $(RIOTBASE)/Makefile.include

View File

@ -197,7 +197,9 @@ TestRef test_cn_cbor(void)
return (TestRef) & tests_cn_cbor; return (TestRef) & tests_cn_cbor;
} }
void tests_cn_cbor(void) int main(void)
{ {
TESTS_START();
TESTS_RUN(test_cn_cbor()); TESTS_RUN(test_cn_cbor());
TESTS_END();
} }

View File

@ -0,0 +1,18 @@
#!/usr/bin/env python3
# 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.
import sys
from testrunner import run
def testfunc(child):
child.expect(r'OK \(\d+ tests\)')
if __name__ == "__main__":
sys.exit(run(testfunc))

View File

@ -1,8 +0,0 @@
include $(RIOTBASE)/Makefile.base
# Tests will fail on platforms <64 bit if not set.
# Workaround for missing overflow detection in cn-cbor.
CFLAGS += -DCBOR_NO_LL
# Skips test cases for floating point data types.
# CFLAGS += -DCBOR_NO_FLOAT

View File

@ -1,3 +0,0 @@
USEPKG += cn-cbor
USEMODULE += fmt
USEMODULE += memarray