[RFC PATCH v2 32/48] test: lmb: invoke the LMB unit tests from a separate script
Sughosh Ganu
sughosh.ganu at linaro.org
Thu Jul 4 09:35:28 CEST 2024
With the LMB tests moved under a separate class of unit tests, invoke
these from a separate script which would allow for a system reset once
the tests have been run. This enables clearing up the LMB memory map
after having run the tests.
Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org>
---
Changes since V1: New patch
test/py/tests/test_lmb.py | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 test/py/tests/test_lmb.py
diff --git a/test/py/tests/test_lmb.py b/test/py/tests/test_lmb.py
new file mode 100644
index 0000000000..b6f9ff9c6a
--- /dev/null
+++ b/test/py/tests/test_lmb.py
@@ -0,0 +1,24 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright 2024 Linaro Ltd
+#
+# Run the LMB tests
+
+import pytest
+
+base_script = '''
+ut lmb -f
+'''
+
+ at pytest.mark.boardspec('sandbox')
+def test_lmb(u_boot_console):
+ cons = u_boot_console
+ cmd = base_script
+
+ with cons.log.section('LMB Unit Test'):
+ output = cons.run_command_list(cmd.splitlines())
+
+ assert 'Failures: 0' in output[-1]
+
+ # Restart so that the LMB memory map starts with
+ # a clean slate for the next set of tests.
+ u_boot_console.restart_uboot()
--
2.34.1
More information about the U-Boot
mailing list