1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/tests/kconfig_features/Makefile
Leandro Lanzieri 03ee4617e2
tests/kconfig_features: Add check for common variable values
This verifies that the following variables have the same value in the
Kconfig counterpart:
- BOARD
- CPU
- CPU_MODEL
- CPU_FAM
- CPU_CORE
- CPU_ARCH
2020-06-18 15:21:07 +02:00

34 lines
1.2 KiB
Makefile

include ../Makefile.tests_common
BOARD_WHITELIST += arduino-duemilanove \
arduino-nano \
arduino-uno \
atmega328p \
cc1312-launchpad \
cc1352-launchpad \
cc1352p-launchpad \
cc2650-launchpad \
cc2650stk \
samr21-xpro
all: checks
include $(RIOTBASE)/Makefile.include
# List of variables to compare between Makefile and Kconfig
_VARS_TO_CHECK = BOARD CPU CPU_MODEL CPU_FAM CPU_CORE CPU_ARCH
# Only compare variables that have a value in Makefile
checks: kconfig-features $(foreach v,$(_VARS_TO_CHECK), $(if $($(v)),check-value-$(v)))
kconfig-features: $(KCONFIG_OUT_CONFIG)
@bash -c 'diff <($(MAKE) info-features-provided) \
<($(MAKE) dependency-debug-features-provided-kconfig) || \
(echo "ERROR: Kconfig features mismatch" && exit 1)'
check-value-%: $(KCONFIG_OUT_CONFIG)
@bash -c '(diff <($(MAKE) info-debug-variable-$*) \
<($(MAKE) info-debug-variable-CONFIG_$*) && echo "SUCCESS: $* values match") || \
(echo "ERROR: The value for $* in Kconfig does not match the one in the Makefile" && exit 1)'