forked from OERV-BSP/u-boot
test: Move stat-printing into its own function
Add a function to show the stats, so we can decide when to print it. This slightly adjusts the output, so that any 'test not found' message appears on its own line after all other output. The 'failures' message now appears in lower case so update pytest accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -36,7 +36,7 @@ def test_spl(u_boot_console, ut_spl_subtest):
|
||||
cons = u_boot_console
|
||||
cons.restart_uboot_with_flags(['-u', '-k', ut_spl_subtest.split()[1]])
|
||||
output = cons.get_spawn_output().replace('\r', '')
|
||||
assert 'Failures: 0' in output
|
||||
assert 'failures: 0' in output
|
||||
finally:
|
||||
# Restart afterward in case a non-SPL test is run next. This should not
|
||||
# happen since SPL tests are run in their own invocation of test.py, but
|
||||
|
||||
@@ -35,4 +35,4 @@ def test_upl_handoff(u_boot_console):
|
||||
|
||||
# Check the FIT offsets look correct
|
||||
output = cons.run_command('ut upl -f upl_test_info_norun')
|
||||
assert 'Failures: 0' in output
|
||||
assert 'failures: 0' in output
|
||||
|
||||
@@ -607,4 +607,4 @@ def test_ut(u_boot_console, ut_subtest):
|
||||
assert 'Unknown command \'quux\' - try \'help\'' in output
|
||||
else:
|
||||
output = u_boot_console.run_command('ut ' + ut_subtest)
|
||||
assert output.endswith('Failures: 0')
|
||||
assert output.endswith('failures: 0')
|
||||
|
||||
@@ -117,4 +117,4 @@ def test_vbe(u_boot_console):
|
||||
with cons.log.section('Kernel load'):
|
||||
output = cons.run_command_list(cmd.splitlines())
|
||||
|
||||
assert 'Failures: 0' in output[-1]
|
||||
assert 'failures: 0' in output[-1]
|
||||
|
||||
@@ -26,7 +26,7 @@ def test_vpl(u_boot_console, ut_vpl_subtest):
|
||||
cons = u_boot_console
|
||||
cons.restart_uboot_with_flags(['-u', '-k', ut_vpl_subtest.split()[1]])
|
||||
output = cons.get_spawn_output().replace('\r', '')
|
||||
assert 'Failures: 0' in output
|
||||
assert 'failures: 0' in output
|
||||
finally:
|
||||
# Restart afterward in case a non-VPL test is run next. This should not
|
||||
# happen since VPL tests are run in their own invocation of test.py, but
|
||||
|
||||
Reference in New Issue
Block a user