From: Stephen Warren Date: Tue, 2 Aug 2016 11:26:18 -0600 Subject: [U-Boot] [PATCH 7/9] test: vboot: Put each test variant in its own section In-Reply-To: <1470008109-9699-8-git-send-email-sjg@chromium.org> References: <1470008109-9699-1-git-send-email-sjg@chromium.org> <1470008109-9699-8-git-send-email-sjg@chromium.org> Message-ID: <31e885fe-544a-1bfc-0654-473307bae802@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > Signed-off-by: Simon Glass 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.