mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
e8141ca5d8
This is a malloc-free implementation of the Concise Binary Object Representation (CBOR) data format for the RIOT-OS. This implementation mostly stand-alone, and it should be pretty easy to port to other platforms. We're only using the C STL and some custom network-related functionaliy which could be easily replaced by depending on arpa/inet.h. The CBOR API is straight-forward to use and provides encoding/decoding functionality for all major C types, such as: - int - uint64_t - int64_t - float - double - char* - struct tm - time_t It is possible to conditionally compile this module via CFLAGS: - CBOR_NO_SEMANTIC_TAGGING: All semantic-tagging features removed - CBOR_NO_CTIME: All ctime related features removed - CBOR_NO_FLOAT: All floating-point related features removed - CBOR_NO_PRINT: All features depending on printf removed
51 lines
1.3 KiB
Makefile
51 lines
1.3 KiB
Makefile
APPLICATION = unittests
|
|
include ../Makefile.tests_common
|
|
|
|
BOARD_INSUFFICIENT_RAM := chronos redbee-econotag stm32f0discovery
|
|
|
|
USEMODULE += embunit
|
|
|
|
INCLUDES += -I$(RIOTBASE)/tests/unittests/embunit
|
|
|
|
ifeq ($(OUTPUT),XML)
|
|
CFLAGS += -DOUTPUT=OUTPUT_XML
|
|
USEMODULE += embunit_textui
|
|
else ifeq ($(OUTPUT),TEXT)
|
|
CFLAGS += -DOUTPUT=OUTPUT_TEXT
|
|
USEMODULE += embunit_textui
|
|
else ifeq ($(OUTPUT),COMPILER)
|
|
CFLAGS += -DOUTPUT=OUTPUT_COMPILER
|
|
USEMODULE += embunit_textui
|
|
endif
|
|
|
|
ifeq (, $(filter tests-%, $(MAKECMDGOALS)))
|
|
UNIT_TESTS := $(shell find -mindepth 1 -maxdepth 1 -type d -name 'tests-*' -printf '%f ')
|
|
else
|
|
UNIT_TESTS := $(filter tests-%, $(MAKECMDGOALS))
|
|
endif
|
|
|
|
# Pull in `Makefile.include`s from the test suites:
|
|
-include $(UNIT_TESTS:%=$(RIOTBASE)/tests/unittests/%/Makefile.include)
|
|
|
|
DIRS += $(UNIT_TESTS)
|
|
BASELIBS += $(UNIT_TESTS:%=$(BINDIR)%.a)
|
|
|
|
include $(RIOTBASE)/Makefile.include
|
|
|
|
$(UNIT_TESTS): all
|
|
|
|
charCOMMA := ,
|
|
|
|
ifeq (, $(UNIT_TESTS))
|
|
CFLAGS += -DNO_TEST_SUITES
|
|
$(warning There was no test suite specified!)
|
|
else
|
|
CFLAGS += -DTEST_SUITES='$(subst $() $(),$(charCOMMA),$(UNIT_TESTS:tests-%=%))'
|
|
endif
|
|
|
|
test: SHELL=bash
|
|
test:
|
|
@exec 5>&1 && \
|
|
LOG=$$("$(MAKE)" -s term | tee >(cat - >&5)) && \
|
|
grep 'OK ([1-9][0-9]* tests)' <<< $${LOG} > /dev/null
|