[U-Boot] [PATCH 7/9] test: vboot: Put each test variant in its own section
Stephen Warren
swarren at wwwdotorg.org
Tue Aug 2 19:26:18 CEST 2016
On 07/31/2016 05:35 PM, Simon Glass wrote:
> Use 'cons.log.section' feature to split up the test output. This makes it
> easier to read.
>
> Suggested-by: Stephen Warren <swarren at nvidia.com>
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
The same nit I mentioned before applies to a few other commits too, such
as this one.
> diff --git a/test/py/tests/test_vboot.py b/test/py/tests/test_vboot.py
> - cons.log.action('%s: Test Verified Boot Run: %s' % (sha_algo, test_type))
> - output = cons.run_command_list(
> - ['sb load hostfs - 100 %stest.fit' % tmpdir,
> - 'fdt addr 100',
> - 'bootm 100'])
> + with cons.log.section('Verified boot %s %s' % (sha_algo, test_type)):
> + output = cons.run_command_list(
> + ['sb load hostfs - 100 %stest.fit' % tmpdir,
> + 'fdt addr 100',
> + 'bootm 100'])
> assert(expect_string in output)
I'd suggest putting the assert inside the "with" block too, so that any
error messages it raises are part of that block.
More information about the U-Boot
mailing list