summaryrefslogtreecommitdiff
path: root/docs/writing_tests.md
AgeCommit message (Collapse)AuthorFilesLines
2024-07-04docs: writing tests: update cleaning instructionsIvan Orlov1-3/+1
After the changes introduced by the previous patches are applied, there is no need of the manual removal of the `build/` directory every time new test is added. Running `make clean` should be enough to regenerate the carray-related files. Update the documentation correspondingly. Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Reviewed-by: Anup Patel <anup@brainfault.org>
2024-03-20docs: writing_tests: Make docs correspond the latest changesIvan Orlov1-4/+1
We should store test object files list in the `libsbi-objs-y` Makefile variable, not in `libsbitests-objs-y`. Update the documentation correspondingly. Since we don't use the `console_dev` static variable directly in the `sbi_console_test` unit test anymore, remove the paragraph which says that we do. Fixes: 86224ec36aed ("docs/writing_tests: Update tests paths") Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2024-03-19docs/writing_tests: Update tests pathsIvan Orlov1-11/+10
Since the tests should be moved to the lib/sbi/tests directory, the documentation should be updated correspondingly. So, update the paths where they have to be changed. Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2024-03-10docs: Add documentation about tests and SBIUnitIvan Orlov1-0/+133
This patch contains the documentation for SBIUnit. It describes: - What is SBIUnit - Simple test writing scenario - How we can cover static functions - How we can "mock" structures in order to test the functions which operate on them - SBIUnit API Reference Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com>