test: Refactor tests to have a single test runner
Get series with b4
b4 am 20210312215630.GC1310@bill-the-catVersions newest first · linked by author and title
- v5 Latest0 of 41 patches 0 repliesNew
- v3 posting 2/20 of 41 patches 0 repliesSuperseded
- v3 posting 1/20 of 41 patches 0 repliesSuperseded
Patches in v5 No applies recorded yet
None of the 41 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [PATCH v5 00/41] test: Refactor tests to have a single test runner
Quoted 21 lines · Simon Glass
At present U-Boot has two broad sets of tests in the C code: driver model tests which do a lot of pre-/post-init and command tests which do not.
This separation makes it slightly harder to write a test, since there are two different test-state structures and different rules for running the two different test types. At present these rules are determined by where the test is (actually its prefix).
All unit tests can be run from the command line with the 'ut' command. Since SPL does not have commands, it currently calls the test runner directly and offers no control of which tests are run.
This seems like a good time to refactor the tests into a unified test runner, allowing U-Boot proper and SPL to use the same path, perhaps with some different conditions along the way.
This series sets up a unified runner called
ut_run_list(), which runs a set of tests from alinker_list. Driver model tests are distinguished by a newUT_TESTF_DMflag so that the necessary init and cleanup can still be done.
Quoted 5 lines
The runner is modified to support running SPL tests that are not solely for driver model. An example test for FIT loading is added as a demonstration.
In addition, some documentation is added to explain how to write tests.
For the series, applied to u-boot/next, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210312/912e4bca/attachment.sig>