FreeRTOS-Kernel/FreeRTOS/Test/Target/tests/smp/template
Soren Ptak 3a2f6646f0
Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083)
* 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.
2023-09-06 12:35:37 -07:00
..
README.md Create SMP on target test framework. (#911) 2023-03-06 13:17:27 +05:30
test_config.h Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00
test_name.c Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083) 2023-09-06 12:35:37 -07:00

How to add a new test?

  1. 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.
  2. Copy the test_name.c and test_config.h files from this template directory to the newly created directory above.
  3. Rename the test_name.c according to the test name.
  4. Implement the test in the above test file.
  5. Add any FreeRTOS specific configuration required for the test to test_config.h.

How to add a new target?

  1. Create a target specific directory in the FreeRTOS/Test/Target/boards directory.
  2. Create required build files.
    • Include test_config.h in FreeRTOSConfig.h at the end.
    • Ensure that the following configurations are not defined in FreeRTOSConfig.h as those are defined in test_config.h:
      • configRUN_MULTIPLE_PRIORITIES
      • configUSE_CORE_AFFINITY
      • configUSE_MINIMAL_IDLE_HOOK
      • configUSE_TASK_PREEMPTION_DISABLE
      • configUSE_TIME_SLICING
      • configUSE_PREEMPTION

How to add a test to a target

  1. 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.
  2. 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();
    }
    
  3. Add the file created above and the test case file to the build system used for the target.