From 71ea0d8a3658760ebba1ffc5fbb44fe585496fe0 Mon Sep 17 00:00:00 2001 From: akscram Date: Thu, 13 Jan 2022 08:28:21 +0000 Subject: [PATCH] Add test coverate for RT tests git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15349 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- test/rt/variant/cfg.mk | 43 +++++++ test/rt/variant/common.mk | 181 ++++++++++++++++++++++++++++ test/rt/variant/make/cfg1/Makefile | 21 ++++ test/rt/variant/make/cfg10/Makefile | 21 ++++ test/rt/variant/make/cfg11/Makefile | 21 ++++ test/rt/variant/make/cfg12/Makefile | 21 ++++ test/rt/variant/make/cfg13/Makefile | 21 ++++ test/rt/variant/make/cfg14/Makefile | 21 ++++ test/rt/variant/make/cfg15/Makefile | 21 ++++ test/rt/variant/make/cfg16/Makefile | 21 ++++ test/rt/variant/make/cfg17/Makefile | 21 ++++ test/rt/variant/make/cfg18/Makefile | 21 ++++ test/rt/variant/make/cfg19/Makefile | 21 ++++ test/rt/variant/make/cfg2/Makefile | 21 ++++ test/rt/variant/make/cfg20/Makefile | 21 ++++ test/rt/variant/make/cfg21/Makefile | 21 ++++ test/rt/variant/make/cfg22/Makefile | 21 ++++ test/rt/variant/make/cfg23/Makefile | 21 ++++ test/rt/variant/make/cfg24/Makefile | 21 ++++ test/rt/variant/make/cfg25/Makefile | 21 ++++ test/rt/variant/make/cfg26/Makefile | 21 ++++ test/rt/variant/make/cfg28/Makefile | 21 ++++ test/rt/variant/make/cfg29/Makefile | 21 ++++ test/rt/variant/make/cfg3/Makefile | 21 ++++ test/rt/variant/make/cfg30/Makefile | 21 ++++ test/rt/variant/make/cfg31/Makefile | 21 ++++ test/rt/variant/make/cfg32/Makefile | 21 ++++ test/rt/variant/make/cfg33/Makefile | 21 ++++ test/rt/variant/make/cfg34/Makefile | 21 ++++ test/rt/variant/make/cfg35/Makefile | 21 ++++ test/rt/variant/make/cfg4/Makefile | 21 ++++ test/rt/variant/make/cfg5/Makefile | 21 ++++ test/rt/variant/make/cfg6/Makefile | 21 ++++ test/rt/variant/make/cfg7/Makefile | 21 ++++ test/rt/variant/make/cfg8/Makefile | 21 ++++ test/rt/variant/make/cfg9/Makefile | 21 ++++ tools/workflows/Makefile | 13 +- tools/workflows/target.yaml | 8 ++ 38 files changed, 957 insertions(+), 2 deletions(-) create mode 100644 test/rt/variant/cfg.mk create mode 100644 test/rt/variant/common.mk create mode 100644 test/rt/variant/make/cfg1/Makefile create mode 100644 test/rt/variant/make/cfg10/Makefile create mode 100644 test/rt/variant/make/cfg11/Makefile create mode 100644 test/rt/variant/make/cfg12/Makefile create mode 100644 test/rt/variant/make/cfg13/Makefile create mode 100644 test/rt/variant/make/cfg14/Makefile create mode 100644 test/rt/variant/make/cfg15/Makefile create mode 100644 test/rt/variant/make/cfg16/Makefile create mode 100644 test/rt/variant/make/cfg17/Makefile create mode 100644 test/rt/variant/make/cfg18/Makefile create mode 100644 test/rt/variant/make/cfg19/Makefile create mode 100644 test/rt/variant/make/cfg2/Makefile create mode 100644 test/rt/variant/make/cfg20/Makefile create mode 100644 test/rt/variant/make/cfg21/Makefile create mode 100644 test/rt/variant/make/cfg22/Makefile create mode 100644 test/rt/variant/make/cfg23/Makefile create mode 100644 test/rt/variant/make/cfg24/Makefile create mode 100644 test/rt/variant/make/cfg25/Makefile create mode 100644 test/rt/variant/make/cfg26/Makefile create mode 100644 test/rt/variant/make/cfg28/Makefile create mode 100644 test/rt/variant/make/cfg29/Makefile create mode 100644 test/rt/variant/make/cfg3/Makefile create mode 100644 test/rt/variant/make/cfg30/Makefile create mode 100644 test/rt/variant/make/cfg31/Makefile create mode 100644 test/rt/variant/make/cfg32/Makefile create mode 100644 test/rt/variant/make/cfg33/Makefile create mode 100644 test/rt/variant/make/cfg34/Makefile create mode 100644 test/rt/variant/make/cfg35/Makefile create mode 100644 test/rt/variant/make/cfg4/Makefile create mode 100644 test/rt/variant/make/cfg5/Makefile create mode 100644 test/rt/variant/make/cfg6/Makefile create mode 100644 test/rt/variant/make/cfg7/Makefile create mode 100644 test/rt/variant/make/cfg8/Makefile create mode 100644 test/rt/variant/make/cfg9/Makefile diff --git a/test/rt/variant/cfg.mk b/test/rt/variant/cfg.mk new file mode 100644 index 000000000..e29b8efb1 --- /dev/null +++ b/test/rt/variant/cfg.mk @@ -0,0 +1,43 @@ +############################################################################## +# Options for test configurations +# + +DEFS_CFG1 = +DEFS_CFG2 = -DCH_CFG_OPTIMIZE_SPEED=FALSE +DEFS_CFG3 = -DCH_CFG_TIME_QUANTUM=0 +DEFS_CFG4 = -DCH_CFG_USE_REGISTRY=FALSE -DCH_CFG_USE_DYNAMIC=FALSE +DEFS_CFG5 = -DCH_CFG_USE_TM=FALSE +DEFS_CFG6 = -DCH_CFG_USE_SEMAPHORES=FALSE -DCH_CFG_USE_MAILBOXES=FALSE -DCH_CFG_USE_OBJ_FIFOS=FALSE -DCH_CFG_USE_OBJ_CACHES=FALSE -DCH_CFG_USE_JOBS=FALSE +DEFS_CFG7 = -DCH_CFG_USE_SEMAPHORES_PRIORITY=TRUE +DEFS_CFG8 = -DCH_CFG_USE_MUTEXES=FALSE -DCH_CFG_USE_CONDVARS=FALSE +DEFS_CFG9 = -DCH_CFG_USE_MUTEXES_RECURSIVE=TRUE +DEFS_CFG10 = -DCH_CFG_USE_CONDVARS=FALSE +DEFS_CFG11 = -DCH_CFG_USE_CONDVARS_TIMEOUT=FALSE +DEFS_CFG12 = -DCH_CFG_USE_EVENTS=FALSE +DEFS_CFG13 = -DCH_CFG_USE_EVENTS_TIMEOUT=FALSE +DEFS_CFG14 = -DCH_CFG_USE_MESSAGES=FALSE -DCH_CFG_USE_DELEGATES=FALSE +DEFS_CFG15 = -DCH_CFG_USE_MESSAGES_PRIORITY=TRUE +DEFS_CFG16 = -DCH_CFG_USE_MAILBOXES=FALSE -DCH_CFG_USE_OBJ_FIFOS=FALSE -DCH_CFG_USE_JOBS=FALSE +DEFS_CFG17 = -DCH_CFG_USE_MEMCORE=FALSE -DCH_CFG_USE_MEMPOOLS=FALSE -DCH_CFG_USE_HEAP=FALSE -DCH_CFG_USE_DYNAMIC=FALSE -DCH_CFG_USE_OBJ_FIFOS=FALSE -DCH_CFG_USE_JOBS=FALSE -DCH_CFG_USE_FACTORY=FALSE +DEFS_CFG18 = -DCH_CFG_USE_MEMPOOLS=FALSE -DCH_CFG_USE_HEAP=FALSE -DCH_CFG_USE_DYNAMIC=FALSE -DCH_CFG_USE_OBJ_FIFOS=FALSE -DCH_CFG_USE_JOBS=FALSE -DCH_CFG_USE_FACTORY=FALSE +DEFS_CFG19 = -DCH_CFG_USE_MEMPOOLS=FALSE -DCH_CFG_USE_OBJ_FIFOS=FALSE -DCH_CFG_USE_JOBS=FALSE -DCH_CFG_USE_FACTORY=FALSE +DEFS_CFG20 = -DCH_CFG_USE_HEAP=FALSE -DCH_CFG_USE_FACTORY=FALSE +DEFS_CFG21 = -DCH_CFG_USE_DYNAMIC=FALSE +DEFS_CFG22 = -DCH_DBG_STATISTICS=TRUE +DEFS_CFG23 = -DCH_DBG_SYSTEM_STATE_CHECK=TRUE +DEFS_CFG24 = -DCH_DBG_ENABLE_CHECKS=TRUE +DEFS_CFG25 = -DCH_DBG_ENABLE_ASSERTS=TRUE +DEFS_CFG26 = -DCH_DBG_TRACE_MASK=CH_DBG_TRACE_MASK_ALL +#DEFS_CFG27 = -DCH_DBG_ENABLE_STACK_CHECK=TRUE +DEFS_CFG28 = -DCH_DBG_FILL_THREADS=TRUE +DEFS_CFG29 = -DCH_DBG_THREADS_PROFILING=FALSE +DEFS_CFG30 = -DCH_DBG_SYSTEM_STATE_CHECK=TRUE -DCH_DBG_ENABLE_CHECKS=TRUE -DCH_DBG_ENABLE_ASSERTS=TRUE -DCH_DBG_TRACE_MASK=CH_DBG_TRACE_MASK_ALL -DCH_DBG_FILL_THREADS=TRUE +DEFS_CFG31 = -DCH_CFG_ST_RESOLUTION=16 +DEFS_CFG32 = -DCH_CFG_ST_RESOLUTION=16 -DCH_CFG_INTERVALS_SIZE=64 +DEFS_CFG33 = -DCH_CFG_INTERVALS_SIZE=64 +DEFS_CFG34 = -DCH_CFG_USE_OBJ_FIFOS=FALSE +DEFS_CFG35 = -DCH_CFG_USE_FACTORY=FALSE + +# +# Options for test configurations +############################################################################## diff --git a/test/rt/variant/common.mk b/test/rt/variant/common.mk new file mode 100644 index 000000000..6b08698fd --- /dev/null +++ b/test/rt/variant/common.mk @@ -0,0 +1,181 @@ +############################################################################## +# Build global options +# NOTE: Can be overridden externally. +# + +# Compiler options here. +ifeq ($(USE_OPT),) + USE_OPT = $(XOPT) -m32 +endif + +# C specific options here (added to USE_OPT). +ifeq ($(USE_COPT),) + USE_COPT = +endif + +# C++ specific options here (added to USE_OPT). +ifeq ($(USE_CPPOPT),) + USE_CPPOPT = -fno-rtti +endif + +# Enable this if you want the linker to remove unused code and data. +ifeq ($(USE_LINK_GC),) + USE_LINK_GC = yes +endif + +# Linker extra options here. +ifeq ($(USE_LDOPT),) + USE_LDOPT = +endif + +# Enable this if you want link time optimizations (LTO). +ifeq ($(USE_LTO),) + USE_LTO = no +endif + +# Enable this if you want to see the full log while compiling. +ifeq ($(USE_VERBOSE_COMPILE),) + USE_VERBOSE_COMPILE = no +endif + +# If enabled, this option makes the build process faster by not compiling +# modules not used in the current configuration. +ifeq ($(USE_SMART_BUILD),) + USE_SMART_BUILD = no +endif + +# +# Build global options +############################################################################## + +############################################################################## +# Architecture or project specific options +# + +XDEFS = $(DEFS_$(CFG)) +XOPT = -O0 -fomit-frame-pointer -fprofile-arcs -ftest-coverage + +# +# Architecture or project specific options +############################################################################## + +############################################################################## +# Project, sources and paths +# + +# Define project name here +PROJECT = ch + +# Imported source files and paths +BUILDDIR := ./build +DEPDIR := ./.dep +CONFDIR := $(CHIBIOS)/test/rt/testbuild + +# Licensing files. +include $(CHIBIOS)/os/license/license.mk +# Startup files. +# HAL-OSAL files (optional). +include $(CHIBIOS)/os/hal/hal.mk +include $(CHIBIOS)/os/hal/boards/simulator/board.mk +include $(CHIBIOS)/os/hal/ports/simulator/posix/platform.mk +include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk +# RTOS files (optional). +include $(CHIBIOS)/os/rt/rt.mk +include $(CHIBIOS)/os/common/ports/SIMIA32/compilers/GCC/port.mk +# Other files (optional). +include $(CHIBIOS)/os/test/test.mk +include $(CHIBIOS)/test/rt/rt_test.mk +include $(CHIBIOS)/test/oslib/oslib_test.mk +#include $(CHIBIOS)/os/hal/lib/streams/streams.mk +#include $(CHIBIOS)/os/various/shell/shell.mk + +# C sources here. +CSRC = $(ALLCSRC) \ + $(TESTSRC) \ + $(CONFDIR)/main.c + +# C++ sources here. +CPPSRC = $(ALLCPPSRC) + +# List ASM source files here. +ASMSRC = $(ALLASMSRC) +ASMXSRC = $(ALLXASMSRC) + +INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC) + +# GCOV files. +GCOVSRC = $(KERNSRC) + +# +# Project, sources and paths +############################################################################## + +############################################################################## +# Start of user section +# + +# List all user C define here, like -D_DEBUG=1 +UDEFS = -DSIMULATOR -DTEST_CFG_SIZE_REPORT=0 -DTEST_DELAY_BETWEEN_TESTS=0 $(XDEFS) + +# Define ASM defines here +UADEFS = + +# List all user directories here +UINCDIR = + +# List the user directory to look for the libraries here +ULIBDIR = + +# List all user libraries here +ULIBS = + +# +# End of user defines +############################################################################## + +############################################################################## +# Compiler settings +# + +TRGT = +CC = $(TRGT)gcc +CPPC = $(TRGT)g++ +# Enable loading with g++ only if you need C++ runtime support. +# NOTE: You can use C++ even without C++ support if you are careful. C++ +# runtime support makes code size explode. +LD = $(TRGT)gcc +#LD = $(TRGT)g++ +CP = $(TRGT)objcopy +AS = $(TRGT)gcc -x assembler-with-cpp +AR = $(TRGT)ar +OD = $(TRGT)objdump +SZ = $(TRGT)size +HEX = $(CP) -O ihex +BIN = $(CP) -O binary +COV = gcov + +# Define C warning options here +CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes -Wcast-align=strict + +# Define C++ warning options here +CPPWARN = -Wall -Wextra -Wundef + +# +# Compiler settings +############################################################################## + +############################################################################## +# Rules +# + +RULESPATH = $(CHIBIOS)/os/common/startup/SIMIA32/compilers/GCC +include $(RULESPATH)/rules.mk + +.PHONY: test +test: + $(BUILDDIR)/$(PROJECT) | tee $(BUILDDIR)/test + @[ $$(grep -c "Final result: SUCCESS" $(BUILDDIR)/test) -eq 2 ] || exit 1 + +# +# Rules +############################################################################## diff --git a/test/rt/variant/make/cfg1/Makefile b/test/rt/variant/make/cfg1/Makefile new file mode 100644 index 000000000..60612aebe --- /dev/null +++ b/test/rt/variant/make/cfg1/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG1 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg10/Makefile b/test/rt/variant/make/cfg10/Makefile new file mode 100644 index 000000000..2efa93440 --- /dev/null +++ b/test/rt/variant/make/cfg10/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG10 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg11/Makefile b/test/rt/variant/make/cfg11/Makefile new file mode 100644 index 000000000..9eeb9d54e --- /dev/null +++ b/test/rt/variant/make/cfg11/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG11 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg12/Makefile b/test/rt/variant/make/cfg12/Makefile new file mode 100644 index 000000000..4cc026c84 --- /dev/null +++ b/test/rt/variant/make/cfg12/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG12 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg13/Makefile b/test/rt/variant/make/cfg13/Makefile new file mode 100644 index 000000000..af7288e0a --- /dev/null +++ b/test/rt/variant/make/cfg13/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG13 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg14/Makefile b/test/rt/variant/make/cfg14/Makefile new file mode 100644 index 000000000..d69271c1c --- /dev/null +++ b/test/rt/variant/make/cfg14/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG14 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg15/Makefile b/test/rt/variant/make/cfg15/Makefile new file mode 100644 index 000000000..489fd4852 --- /dev/null +++ b/test/rt/variant/make/cfg15/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG15 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg16/Makefile b/test/rt/variant/make/cfg16/Makefile new file mode 100644 index 000000000..1e6cb3478 --- /dev/null +++ b/test/rt/variant/make/cfg16/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG16 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg17/Makefile b/test/rt/variant/make/cfg17/Makefile new file mode 100644 index 000000000..c5312b6d6 --- /dev/null +++ b/test/rt/variant/make/cfg17/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG17 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg18/Makefile b/test/rt/variant/make/cfg18/Makefile new file mode 100644 index 000000000..16e5256b9 --- /dev/null +++ b/test/rt/variant/make/cfg18/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG18 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg19/Makefile b/test/rt/variant/make/cfg19/Makefile new file mode 100644 index 000000000..a6cdf392d --- /dev/null +++ b/test/rt/variant/make/cfg19/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG19 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg2/Makefile b/test/rt/variant/make/cfg2/Makefile new file mode 100644 index 000000000..9d50b7ef5 --- /dev/null +++ b/test/rt/variant/make/cfg2/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG2 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg20/Makefile b/test/rt/variant/make/cfg20/Makefile new file mode 100644 index 000000000..567015839 --- /dev/null +++ b/test/rt/variant/make/cfg20/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG20 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg21/Makefile b/test/rt/variant/make/cfg21/Makefile new file mode 100644 index 000000000..7b9a69cf9 --- /dev/null +++ b/test/rt/variant/make/cfg21/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG21 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg22/Makefile b/test/rt/variant/make/cfg22/Makefile new file mode 100644 index 000000000..54acf547f --- /dev/null +++ b/test/rt/variant/make/cfg22/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG22 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg23/Makefile b/test/rt/variant/make/cfg23/Makefile new file mode 100644 index 000000000..10137a9b3 --- /dev/null +++ b/test/rt/variant/make/cfg23/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG23 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg24/Makefile b/test/rt/variant/make/cfg24/Makefile new file mode 100644 index 000000000..34cbcd3f7 --- /dev/null +++ b/test/rt/variant/make/cfg24/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG24 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg25/Makefile b/test/rt/variant/make/cfg25/Makefile new file mode 100644 index 000000000..12daf6b9c --- /dev/null +++ b/test/rt/variant/make/cfg25/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG25 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg26/Makefile b/test/rt/variant/make/cfg26/Makefile new file mode 100644 index 000000000..30e03bfe2 --- /dev/null +++ b/test/rt/variant/make/cfg26/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG26 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg28/Makefile b/test/rt/variant/make/cfg28/Makefile new file mode 100644 index 000000000..07ea80233 --- /dev/null +++ b/test/rt/variant/make/cfg28/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG28 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg29/Makefile b/test/rt/variant/make/cfg29/Makefile new file mode 100644 index 000000000..2e67cfb89 --- /dev/null +++ b/test/rt/variant/make/cfg29/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG29 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg3/Makefile b/test/rt/variant/make/cfg3/Makefile new file mode 100644 index 000000000..ae7dffebf --- /dev/null +++ b/test/rt/variant/make/cfg3/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG3 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg30/Makefile b/test/rt/variant/make/cfg30/Makefile new file mode 100644 index 000000000..812c1f66a --- /dev/null +++ b/test/rt/variant/make/cfg30/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG30 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg31/Makefile b/test/rt/variant/make/cfg31/Makefile new file mode 100644 index 000000000..d4edcfa51 --- /dev/null +++ b/test/rt/variant/make/cfg31/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG31 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg32/Makefile b/test/rt/variant/make/cfg32/Makefile new file mode 100644 index 000000000..c116414c2 --- /dev/null +++ b/test/rt/variant/make/cfg32/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG32 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg33/Makefile b/test/rt/variant/make/cfg33/Makefile new file mode 100644 index 000000000..2328dc86a --- /dev/null +++ b/test/rt/variant/make/cfg33/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG33 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg34/Makefile b/test/rt/variant/make/cfg34/Makefile new file mode 100644 index 000000000..0c18635ad --- /dev/null +++ b/test/rt/variant/make/cfg34/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG34 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg35/Makefile b/test/rt/variant/make/cfg35/Makefile new file mode 100644 index 000000000..7346aef70 --- /dev/null +++ b/test/rt/variant/make/cfg35/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG35 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg4/Makefile b/test/rt/variant/make/cfg4/Makefile new file mode 100644 index 000000000..c6a6114aa --- /dev/null +++ b/test/rt/variant/make/cfg4/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG4 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg5/Makefile b/test/rt/variant/make/cfg5/Makefile new file mode 100644 index 000000000..9d252d7a5 --- /dev/null +++ b/test/rt/variant/make/cfg5/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG5 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg6/Makefile b/test/rt/variant/make/cfg6/Makefile new file mode 100644 index 000000000..5b633f98b --- /dev/null +++ b/test/rt/variant/make/cfg6/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG6 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg7/Makefile b/test/rt/variant/make/cfg7/Makefile new file mode 100644 index 000000000..036c455c8 --- /dev/null +++ b/test/rt/variant/make/cfg7/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG7 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg8/Makefile b/test/rt/variant/make/cfg8/Makefile new file mode 100644 index 000000000..ecbd840ba --- /dev/null +++ b/test/rt/variant/make/cfg8/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG8 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/test/rt/variant/make/cfg9/Makefile b/test/rt/variant/make/cfg9/Makefile new file mode 100644 index 000000000..741432db7 --- /dev/null +++ b/test/rt/variant/make/cfg9/Makefile @@ -0,0 +1,21 @@ +############################################################################## +# Project options +# + +CFG := CFG9 +CHIBIOS = ../../../../.. + +# +# Project options +############################################################################## + +############################################################################## +# Common options +# + +include $(CHIBIOS)/test/rt/variant/cfg.mk +include $(CHIBIOS)/test/rt/variant/common.mk + +# +# Common options +############################################################################## diff --git a/tools/workflows/Makefile b/tools/workflows/Makefile index a4217defa..a5c1709d4 100644 --- a/tools/workflows/Makefile +++ b/tools/workflows/Makefile @@ -4,8 +4,9 @@ ROOT := $(realpath ../..) # Directories to store results of tests and docs -TEST_RESULTS := $(ROOT)/test_results +COVERAGE_RESULTS := $(ROOT)/coverage_results DOC_RESULTS := $(ROOT)/doc_results +TEST_RESULTS := $(ROOT)/test_results # Directory with auxiliary scripts WORKFLOWS := $(ROOT)/tools/workflows @@ -47,7 +48,7 @@ else makefile_venv := endif -.PHONY : all makefiles external docs info lint clean venv +.PHONY : all makefiles external docs info lint coverage clean venv .PHONY : $(makefiles) $(linters) $(docs) # Build makefile based projects @@ -121,9 +122,17 @@ $(venv_activate) : -r $(WORKFLOWS)/requirements.txt \ -c $(WORKFLOWS)/constraints.txt +# Generate test coverage report +coverage : + @mkdir -p $(COVERAGE_RESULTS) + gcovr -r $(ROOT) \ + --use-gcov-files --gcov-ignore-parse-errors \ + --xml-pretty --xml $(COVERAGE_RESULTS)/coverage.xml + # Clean up results of tests and docs clean : rm -rf $(TEST_RESULTS) + rm -rf $(COVERAGE_RESULTS) rm -rf $(DOC_RESULTS) rm -rf $(external) rm -rf $(venv) diff --git a/tools/workflows/target.yaml b/tools/workflows/target.yaml index 904c149a4..f72326f4a 100644 --- a/tools/workflows/target.yaml +++ b/tools/workflows/target.yaml @@ -7,5 +7,13 @@ demos/various/RT-ARMCM4-MAKELIB/Makefile: - lib - clean +# This makefile is intended to be run manually to test all STM32WLxx related +# testhal projects. So, there is no need to test its targets in CI. testhal/STM32/STM32WLxx/Makefile: [] +# Build different RT configuration variants and generate gcov files. +test/rt/variant/make: + - all + - test + - gcov + - clean