mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-27 07:46:20 -04:00
* Use new version of CI-CD Actions, checkout@v3 instead of checkout@v2 on all jobs * Use cSpell spell check, and use ubuntu-20.04 for formatting check * Add in bot formatting action * Update freertos_demo.yml and freertos_plus_demo.yml files to increase github log readability * Add in a Qemu demo onto the workflows. |
||
|---|---|---|
| .. | ||
| README.md | ||
| test_config.h | ||
| test_name.c | ||
How to add a new test?
- Create a directory in the
FreeRTOS/Test/Target/testsdirectory which will contain the test. For example:FreeRTOS/Test/Target/tests/smp/multiple_tasks_running. - Copy the
test_name.candtest_config.hfiles from this template directory to the newly created directory above. - Rename the
test_name.caccording 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/boardsdirectory. - Create required build files.
- Include
test_config.hinFreeRTOSConfig.hat the end. - Ensure that the following configurations are not defined in
FreeRTOSConfig.has those are defined intest_config.h:configRUN_MULTIPLE_PRIORITIESconfigUSE_CORE_AFFINITYconfigUSE_MINIMAL_IDLE_HOOKconfigUSE_TASK_PREEMPTION_DISABLEconfigUSE_TIME_SLICINGconfigUSE_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.