[RFC PATCH v1 3/7] test/py/tests/test_bootstage.py: add test for JSON report

Jerome Forissier jerome.forissier at linaro.org
Fri Apr 11 17:29:29 CEST 2025


Add test for CONFIG_BOOTSTAGE_REPORT_JSON.

Signed-off-by: Jerome Forissier <jerome.forissier at linaro.org>
---

 test/py/tests/test_bootstage.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/py/tests/test_bootstage.py b/test/py/tests/test_bootstage.py
index 379c1cae6dd..8d0afe2611b 100644
--- a/test/py/tests/test_bootstage.py
+++ b/test/py/tests/test_bootstage.py
@@ -30,6 +30,15 @@ def test_bootstage_report(ubman):
     assert 'Accumulated time:' in output
     assert 'dm_r' in output
 
+ at pytest.mark.buildconfigspec('bootstage')
+ at pytest.mark.buildconfigspec('cmd_bootstage')
+ at pytest.mark.buildconfigspec('bootstage_report_json')
+def test_bootstage_report_json(ubman):
+    output = ubman.run_command('bootstage report')
+    assert '=== Begin JSON bootstage report ===' in output
+    assert '"dm_r"' in output
+    assert '"reset~board_init_f"' in output
+
 @pytest.mark.buildconfigspec('bootstage')
 @pytest.mark.buildconfigspec('cmd_bootstage')
 @pytest.mark.buildconfigspec('bootstage_stash')
-- 
2.43.0



More information about the U-Boot mailing list