<commit_before>APPLICATION = unittests
include ../Makefile.tests_common

BOARD_INSUFFICIENT_MEMORY := airfy-beacon arduino-duemilanove arduino-mega2560 \
                             arduino-uno arduino-zero calliope-mini cc2650stk \
                             chronos ek-lm4f120xl limifrog-v1 maple-mini microbit \
                             msb-430 msb-430h nrf51dongle nrf6310 nucleo32-f031 \
                             nucleo32-f042 nucleo32-f303 nucleo32-l031 nucleo-f030 \
                             nucleo-f070 nucleo-f072 nucleo-f091 nucleo-f103 nucleo-f302 \
                             nucleo-f334 nucleo-f410 nucleo-l053 nucleo-l073 opencm904 \
                             pba-d-01-kw2x pca10000 pca10005 remote-pa remote-reva \
                             remote-revb saml21-xpro samr21-xpro seeeduino_arch-pro \
                             slwstk6220a sodaq-autonomo spark-core stm32f0discovery \
                             stm32f3discovery telosb waspmote-pro weio wsn430-v1_3b \
                             wsn430-v1_4 yunjia-nrf51822 z1

USEMODULE += embunit

ifeq (, $(filter tests-%, $(MAKECMDGOALS)))
    UNIT_TESTS := $(foreach d,$(wildcard tests-*/Makefile),$(shell dirname $(d)))
else
    UNIT_TESTS := $(filter tests-%, $(MAKECMDGOALS))
endif

ARM7_BOARDS := msba2 avrextrem
DISABLE_TEST_FOR_ARM7 := tests-relic

ARM_CORTEX_M_BOARDS := airfy-beacon arduino-due arduino-zero cc2538dk ek-lm4f120xl \
                       f4vi1 fox frdm-k64f iotlab-m3 limifrog-v1 mbed_lpc1768 msbiot \
                       mulle nrf51dongle nrf6310 nucleo144-f429 nucleo144-f446 nucleo32-f031 \
                       nucleo32-f303 nucleo32-l031 nucleo-f030 nucleo-f070 nucleo-f091 \
                       nucleo-f302 nucleo-f303 nucleo-f334 nucleo-f401 nucleo-f410 nucleo-f411 \
                       nucleo-l053 nucleo-l073 nucleo-l1 opencm904 openmote-cc2538 pba-d-01-kw2x \
                       pca10000 pca10005 remote saml21-xpro samr21-xpro slwstk6220a sodaq-autonomo \
                       spark-core stm32f0discovery stm32f3discovery stm32f4discovery \
                       udoo weio yunjia-nrf51822

DISABLE_TEST_FOR_ARM_CORTEX_M := tests-relic

AVR_BOARDS := arduino-mega2560 waspmote-pro arduino-uno arduino-duemilanove
DISABLE_TEST_FOR_AVR := tests-relic

MSP430_BOARDS :=  chronos msb-430 msb-430h telosb wsn430-v1_3b wsn430-v1_4 z1
DISABLE_TEST_FOR_MSP430 := tests-relic

ifneq (, $(filter $(ARM7_BOARDS), $(BOARD)))
UNIT_TESTS := $(filter-out $(DISABLE_TEST_FOR_ARM7), $(UNIT_TESTS))
endif

ifneq (, $(filter $(ARM_CORTEX_M_BOARDS), $(BOARD)))
UNIT_TESTS := $(filter-out $(DISABLE_TEST_FOR_ARM_CORTEX_M), $(UNIT_TESTS))
endif

ifneq (, $(filter $(AVR_BOARDS), $(BOARD)))
UNIT_TESTS := $(filter-out $(DISABLE_TEST_FOR_AVR), $(UNIT_TESTS))
endif

ifneq (, $(filter $(MSP430_BOARDS), $(BOARD)))
UNIT_TESTS := $(filter-out $(DISABLE_TEST_FOR_AVR), $(UNIT_TESTS))
endif

DISABLE_MODULE += auto_init

# 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)

INCLUDES += -I$(RIOTBASE)/tests/unittests/common

include $(RIOTBASE)/Makefile.include

.PHONY: $(UNIT_TESTS)

all:

$(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:
	./tests/01-run.py
<commit_msg>test: added nucleo-f476 to unittest targets<commit_after>APPLICATION = unittests
include ../Makefile.tests_common

BOARD_INSUFFICIENT_MEMORY := airfy-beacon arduino-duemilanove arduino-mega2560 \
                             arduino-uno arduino-zero calliope-mini cc2650stk \
                             chronos ek-lm4f120xl limifrog-v1 maple-mini microbit \
                             msb-430 msb-430h nrf51dongle nrf6310 nucleo32-f031 \
                             nucleo32-f042 nucleo32-f303 nucleo32-l031 nucleo-f030 \
                             nucleo-f070 nucleo-f072 nucleo-f091 nucleo-f103 nucleo-f302 \
                             nucleo-f334 nucleo-f410 nucleo-l053 nucleo-l073 opencm904 \
                             pba-d-01-kw2x pca10000 pca10005 remote-pa remote-reva \
                             remote-revb saml21-xpro samr21-xpro seeeduino_arch-pro \
                             slwstk6220a sodaq-autonomo spark-core stm32f0discovery \
                             stm32f3discovery telosb waspmote-pro weio wsn430-v1_3b \
                             wsn430-v1_4 yunjia-nrf51822 z1

USEMODULE += embunit

ifeq (, $(filter tests-%, $(MAKECMDGOALS)))
    UNIT_TESTS := $(foreach d,$(wildcard tests-*/Makefile),$(shell dirname $(d)))
else
    UNIT_TESTS := $(filter tests-%, $(MAKECMDGOALS))
endif

ARM7_BOARDS := msba2 avrextrem
DISABLE_TEST_FOR_ARM7 := tests-relic

ARM_CORTEX_M_BOARDS := airfy-beacon arduino-due arduino-zero cc2538dk ek-lm4f120xl \
                       f4vi1 fox frdm-k64f iotlab-m3 limifrog-v1 mbed_lpc1768 msbiot \
                       mulle nrf51dongle nrf6310 nucleo144-f429 nucleo144-f446 nucleo32-f031 \
                       nucleo32-f303 nucleo32-l031 nucleo-f030 nucleo-f070 nucleo-f091 \
                       nucleo-f302 nucleo-f303 nucleo-f334 nucleo-f401 nucleo-f410 nucleo-f411 \
                       nucleo-l053 nucleo-l073 nucleo-l1 nucleo-l476 \
                       opencm904 openmote-cc2538 pba-d-01-kw2x \
                       pca10000 pca10005 remote saml21-xpro samr21-xpro slwstk6220a sodaq-autonomo \
                       spark-core stm32f0discovery stm32f3discovery stm32f4discovery \
                       udoo weio yunjia-nrf51822

DISABLE_TEST_FOR_ARM_CORTEX_M := tests-relic

AVR_BOARDS := arduino-mega2560 waspmote-pro arduino-uno arduino-duemilanove
DISABLE_TEST_FOR_AVR := tests-relic

MSP430_BOARDS :=  chronos msb-430 msb-430h telosb wsn430-v1_3b wsn430-v1_4 z1
DISABLE_TEST_FOR_MSP430 := tests-relic

ifneq (, $(filter $(ARM7_BOARDS), $(BOARD)))
UNIT_TESTS := $(filter-out $(DISABLE_TEST_FOR_ARM7), $(UNIT_TESTS))
endif

ifneq (, $(filter $(ARM_CORTEX_M_BOARDS), $(BOARD)))
UNIT_TESTS := $(filter-out $(DISABLE_TEST_FOR_ARM_CORTEX_M), $(UNIT_TESTS))
endif

ifneq (, $(filter $(AVR_BOARDS), $(BOARD)))
UNIT_TESTS := $(filter-out $(DISABLE_TEST_FOR_AVR), $(UNIT_TESTS))
endif

ifneq (, $(filter $(MSP430_BOARDS), $(BOARD)))
UNIT_TESTS := $(filter-out $(DISABLE_TEST_FOR_AVR), $(UNIT_TESTS))
endif

DISABLE_MODULE += auto_init

# 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)

INCLUDES += -I$(RIOTBASE)/tests/unittests/common

include $(RIOTBASE)/Makefile.include

.PHONY: $(UNIT_TESTS)

all:

$(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:
	./tests/01-run.py

{'fraction_non_alphanumeric': 0.11137674026156659, 'fraction_numerical': 0.0810012656447757, 'mean_word_length': 2.6101522842639593, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6478492', 'n_tokens_mistral': 3025, 'n_tokens_neox': 2644, 'n_words': 462}