
2 Aug
2016
2 Aug
'16
7:26 p.m.
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@nvidia.com
Signed-off-by: Simon Glass sjg@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.