FreeRTOS-Kernel/FreeRTOS/Test/CMock
Paul Bartell 570ae6bb52
Add unity memory extension, fake_assert, and enable -fsanitize=address (#506)
* 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
2021-02-18 10:15:01 -08:00
..
CMock@afa294982e Inititial stub for cmock tests (#297) 2020-09-24 17:06:28 -07:00
config Add unity memory extension, fake_assert, and enable -fsanitize=address (#506) 2021-02-18 10:15:01 -08:00
doc Add Kernel Unit Tests Environment (#494) 2021-02-08 15:26:01 -08:00
list Add unity memory extension, fake_assert, and enable -fsanitize=address (#506) 2021-02-18 10:15:01 -08:00
queue Add unity memory extension, fake_assert, and enable -fsanitize=address (#506) 2021-02-18 10:15:01 -08:00
timers Add unity memory extension, fake_assert, and enable -fsanitize=address (#506) 2021-02-18 10:15:01 -08:00
Makefile Add unity memory extension, fake_assert, and enable -fsanitize=address (#506) 2021-02-18 10:15:01 -08:00
makefile.in Add unity memory extension, fake_assert, and enable -fsanitize=address (#506) 2021-02-18 10:15:01 -08:00
Readme.md Add Kernel Unit Tests Environment (#494) 2021-02-08 15:26:01 -08:00

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