aboutsummaryrefslogtreecommitdiff
path: root/test/bloblist.c
diff options
context:
space:
mode:
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>2022-04-02 20:06:08 +0300
committerSimon Glass <sjg@chromium.org>2022-06-28 03:09:51 +0100
commitebcaafcded40da8ae6cb4234c2ba9901c7bee644 (patch)
tree3e1adb9dd654f0bf2107765f25da91f127408f90 /test/bloblist.c
parentdd6b92b0b9532bb4ba0ad8ac3620b1f3b81adf5b (diff)
patman: test_util: Print test stdout/stderr within test summaries
While running tests for a python tool, the tests' outputs get printed in whatever order they happen to run, without any indication as to which output belongs to which test. Unittest supports capturing these outputs and printing them as part of the test summaries, but when a failure or error occurs it switches back to printing as the tests run. Testtools and subunit tests can do the same as their parts inherit from unittest, but they don't outright expose this functionality. On the unittest side, enable output buffering for the custom test result class. Try to avoid ugly outputs by not printing stdout/stderr before the test summary for low verbosity levels and for successful tests. On the subunit side, implement a custom TestProtocolClient that enables the same underlying functionality and injects the captured streams as additional test details. This causes them to be merged into their test's error traceback message, which is later rebuilt into an exception and passed to our unittest report class. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/bloblist.c')
0 files changed, 0 insertions, 0 deletions