aboutsummaryrefslogtreecommitdiff
path: root/test/py
diff options
context:
space:
mode:
authorSimon Glass2020-09-12 12:28:49 -0600
committerTom Rini2020-10-10 16:50:11 -0400
commit3d03ab6361a4a2b60e84da46c547b8ace01a60eb (patch)
treeb7cab1ed0489fd262afc76cf6ec72606c9dc51c5 /test/py
parentbd180db2cc73c7dc00076b0517978a8cdd557519 (diff)
log: Add a way to enable/disable a log device
At present all log devices are enabled by default. Add a function to allow devices to be disabled or enabled at runtime. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/py')
-rw-r--r--test/py/tests/test_log.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/py/tests/test_log.py b/test/py/tests/test_log.py
index ddc28f19ee8..275f9382d2f 100644
--- a/test/py/tests/test_log.py
+++ b/test/py/tests/test_log.py
@@ -92,6 +92,13 @@ def test_log(u_boot_console):
for i in range(7):
assert 'log_test() level %d' % i == next(lines)
+ def test11():
+ """Test use of log_device_set_enable()"""
+ lines = run_test(11)
+ assert 'log_test() default'
+ # disabled should not be displayed
+ assert 'log_test() enabled'
+
# TODO(sjg@chromium.org): Consider structuring this as separate tests
cons = u_boot_console
test0()
@@ -105,6 +112,7 @@ def test_log(u_boot_console):
test8()
test9()
test10()
+ test11()
@pytest.mark.buildconfigspec('cmd_log')
def test_log_format(u_boot_console):