mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-16 17:57:44 -04:00
* Test: add multi config ability to build system * Remove Tests that are not implemented yet from the makefile * Fix header check * Test: Unit Test tasks.c * UnitTest: tasks.c Save progress * saving some work 70% coverage * coverage 77% * tasks.c coverage 90% * tasks.c coverage 95% * Cleanup and common header * Cover some extra branches, no_mutex +stack growth * Fix Makefile not to use modified version of c-preprocessor * Remove c-preprocessor errros * Rebase and add some tests * Fortify_source=1 and O0 are mutually exclusive * Style: Uncrustify code * Style: Fix indent * Fix Header checks * Add prototypes * Build: use unifdef instead of the c-preprocessor to generate different configurations * Build: fix makefile cflags * Fix UT after upgrading kernel version * Resolve conflicts and test failures * Comment fix version number * Fix build error * Update FreeRTOS/Test/CMock/Makefile Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com> Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
46 lines
1.2 KiB
Makefile
46 lines
1.2 KiB
Makefile
# Indent with spaces
|
|
.RECIPEPREFIX := $(.RECIPEPREFIX) $(.RECIPEPREFIX)
|
|
|
|
# Define directory paths
|
|
SCRATCH_DIR := $(GENERATED_DIR)/$(PROJECT)
|
|
|
|
LCOV_LIST := $(foreach suite,$(SUITES),$(SCRATCH_DIR)/$(PROJECT)_$(suite).info)
|
|
COVINFO := $(GENERATED_DIR)/$(PROJECT).info
|
|
COV_REPORT_DIR := $(SCRATCH_DIR)/coverage
|
|
|
|
.PHONY: all clean libs run bin lcov zerocoverage lcovhtml
|
|
|
|
all: run
|
|
|
|
clean :
|
|
rm -rf $(SCRATCH_DIR)
|
|
rm -f $(BIN_DIR)/$(PROJECT)*_utest
|
|
rm -f $(COVINFO)
|
|
|
|
libs :
|
|
make -C $(UT_ROOT_DIR) libs
|
|
|
|
lcov : $(COVINFO)
|
|
|
|
# run each suite and leave gcda / gcov files in place
|
|
run: libs
|
|
$(foreach suite,$(SUITES),\
|
|
make -C $(suite) run;)
|
|
|
|
bin: $(EXEC_LIST)
|
|
|
|
zerocoverage:
|
|
$(LCOV_BIN_DIR)/lcov --zerocounters --directory $(SCRATCH_DIR)
|
|
|
|
# Generate lcov for each suite
|
|
$(LCOV_LIST) :
|
|
$(foreach suite,$(SUITES),\
|
|
make -C $(suite) lcov;)
|
|
|
|
# Combine lcov from each subdirectory into one lcov info file for the project
|
|
$(COVINFO) : $(LCOV_LIST)
|
|
lcov $(LCOV_OPTS) -o $@ $(foreach cov,$(LCOV_LIST),--add-tracefile $(cov) )
|
|
|
|
lcovhtml : $(COVINFO)
|
|
mkdir -p $(COV_REPORT_DIR)
|
|
genhtml $(COVINFO) $(LCOV_OPTS) --output-directory $(COV_REPORT_DIR)
|