diff mbox series

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

Message ID 20250411153040.1772000-4-jerome.forissier@linaro.org
State New
Headers show
Series Bootstage reports for CI | expand

Commit Message

Jerome Forissier April 11, 2025, 3:29 p.m. UTC
Add test for CONFIG_BOOTSTAGE_REPORT_JSON.

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

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

Patch

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
 
+@pytest.mark.buildconfigspec('bootstage')
+@pytest.mark.buildconfigspec('cmd_bootstage')
+@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')