mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-16 17:57:44 -04:00
* Enable libunitymemory extension to track dynamic memory usage during unit tests * Use UnityMemory in timers_utest.c * Add fake_assert.h to allow mocking of configASSERT calls * Add .editorconfig to make github show indentation correctly * Add unity memory and fake_assert to queue_utest.c * Add -fsanitize=address CFLAG when running unit tests * Define mtCOVERAGE_TEST_MARKER macro to include mtCOVERAGE_TEST_MARKER lines in coverage figures * Add additional memory check / protection CFLAGS for CMock tests * Fix out of bounds array access in list_utest.c * Move the fake_assert.h include to the top of FreeRTOSConfig.h |
||
---|---|---|
.. | ||
CMock@afa294982e | ||
config | ||
doc | ||
list | ||
queue | ||
timers | ||
Makefile | ||
makefile.in | ||
Readme.md |
FreeRTOS Kernel Unit Tests
Prerequisites as tested
GCC
gcc: gcc (GCC) 9.2.0
LCOV
lcov: LCOV version 1.14-6-g40580cd
Make
GNU Make 3.82
Ruby
ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
Doxygen (optional)
1.8.5
How to run
$ make help
Usage: $ make <unit>
where <unit> is one of: queue doc all run run_formatted run_col
run_col_formatted coverage
Explanation
$ make queue
Would build the kernel queue unit tests and put the executable in build/bin
$ make doc
Would generate the doxygen documentation in build/doc
$ make run | run_formatted | run_col | run_col_formatted
Would build all unit tests and runs them one after the other with different options between normal and formatted and colored for easily spotting errors
$ make coverage
Would build all unit tests, runs them one after the other, then generates html code coverage and places them in build/coverage with initial file index.html