forked from Mirrors/opensbi
lib: tests: Add sbi_console test
Add the test suite covering some of the functions from lib/sbi/sbi_console.c: putc, puts and printf. The test covers a variety of format specifiers for printf and different strings and characters for putc and puts. In order to do that, the test "mocks" the sbi_console_device structure by setting the 'console_dev' variable to the virtual console. Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
This commit is contained in:
@@ -488,3 +488,7 @@ int sbi_console_init(struct sbi_scratch *scratch)
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SBIUNIT
|
||||
#include "sbi_console_test.c"
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user