aboutsummaryrefslogtreecommitdiff
path: root/test_util.c
Commit message (Collapse)AuthorAge
* Add test runnerDavid Phillips2021-02-13
| | | | | | | | | | | | | | This patch adds a "magic" test runner which discovers all test cases in the executable into which it is linked. This is achieved through the use of a special macro used to declare tests, so that they are added onto a linker- generated list. The linker list logic is largely taken from U-Boot source code, with minor some tweaks made. This linker-generated list is then used at runtime in order to pick out every test case which can be run, resulting in a cross-file "suite" of unity unit tests, rather than separate test executables per module. A sample test module, test_test.c is provided to illustrate the test runner's ability to correctly discover tests across multiple translation units.
* Add missing test_util.cDavid Phillips2021-02-09
Accidentally forgot to add this previously.