[PATCH 21/21] test: Add a way to check each line of console output

sjg at google.com sjg at google.com
Wed Feb 5 18:55:00 CET 2020


When writing tests to check the output from commands it is useful to be
able to check the output line by line using an assertion. Add helper
macros to support this and to check that there is no unexpected trailing
data.

Also some commands produce a dump using print_buffer(). Add a way to check
that the correct number of bytes are dumped (ignoring the actual
contents).

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 include/test/test.h |  4 +++
 include/test/ut.h   | 65 +++++++++++++++++++++++++++++++++++++++++++++
 test/ut.c           | 46 ++++++++++++++++++++++++++++++++
 3 files changed, 115 insertions(+)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list