mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-15 17:27:46 -04:00
|
||
---|---|---|
.. | ||
README.md | ||
test_config.h | ||
test_name.c |
How to add a new test?
- Create a directory in the
FreeRTOS/Test/Target/tests
directory which will contain the test. For example:FreeRTOS/Test/Target/tests/smp/multiple_tasks_running
. - Copy the
test_name.c
andtest_config.h
files from this template directory to the newly created directory above. - Rename the
test_name.c
according to the test name. - Implement the test in the above test file.
- Add any FreeRTOS specific configuration required for the test to
test_config.h
.
How to add a new target?
- Create a target specific directory in the
FreeRTOS/Test/Target/boards
directory. - Create required build files.
- Include
test_config.h
inFreeRTOSConfig.h
at the end. - Ensure that the following configurations are not defined in
FreeRTOSConfig.h
as those are defined intest_config.h
:configRUN_MULTIPLE_PRIORITIES
configUSE_CORE_AFFINITY
configUSE_TASK_PREEMPTION_DISABLE
configUSE_TIME_SLICING
configUSE_PREEMPTION
- Include
How to add a test to a target
- Create a directory in the target's directory which will contain
the test. For example:
FreeRTOS/Test/Target/boards/pico/tests/smp/multiple_tasks_running
. - Create a C file and invoke the test case from a task. The invocation
usually looks like the following:
void prvTestRunnerTask( void * pvParameters ) { /* Invoke the test case. */ vRunTestCaseName(); }
- Add the file created above and the test case file to the build system used for the target.