summaryrefslogtreecommitdiff
path: root/test/py/tests/test_log.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-07-04 09:25:51 -0600
committerTom Rini <trini@konsulko.com>2024-07-04 09:25:51 -0600
commite24053d8fb42c909b470e33f19ac71fd718133ce (patch)
treeb69fd2a2ee983403d9ea52b928632dbac3eaff03 /test/py/tests/test_log.py
parent0f073e022ddc5070e5df1d053e4bdc1874fbcc0f (diff)
parent4a8a54c3f4202482ec4f24a117afc38cf2c0c051 (diff)
Merge patch series "testb: Various tweaks and fixes for Labgrid"
Simon Glass <sjg@chromium.org> says: This series includes a number of mostly unrelated changes which are in service of running U-Boot on a lab using Labgrid.
Diffstat (limited to 'test/py/tests/test_log.py')
-rw-r--r--test/py/tests/test_log.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/py/tests/test_log.py b/test/py/tests/test_log.py
index 140dcb9aa2b..79808674bbe 100644
--- a/test/py/tests/test_log.py
+++ b/test/py/tests/test_log.py
@@ -27,13 +27,16 @@ def test_log_format(u_boot_console):
cons = u_boot_console
with cons.log.section('format'):
- run_with_format('all', 'NOTICE.arch,file.c:123-func() msg')
+ pad = int(u_boot_console.config.buildconfig.get('config_logf_func_pad'))
+ padding = ' ' * (pad - len('func'))
+
+ run_with_format('all', f'NOTICE.arch,file.c:123-{padding}func() msg')
output = cons.run_command('log format')
assert output == 'Log format: clFLfm'
- run_with_format('fm', 'func() msg')
- run_with_format('clfm', 'NOTICE.arch,func() msg')
- run_with_format('FLfm', 'file.c:123-func() msg')
+ run_with_format('fm', f'{padding}func() msg')
+ run_with_format('clfm', f'NOTICE.arch,{padding}func() msg')
+ run_with_format('FLfm', f'file.c:123-{padding}func() msg')
run_with_format('lm', 'NOTICE. msg')
run_with_format('m', 'msg')