diff mbox series

[PATCHv4,6/6] test: py: add initial coverage for scp03 cmd

Message ID 20210209193413.26572-6-jorge@foundries.io
State Superseded
Delegated to: Tom Rini
Headers show
Series [PATCHv4,1/6] common: SCP03 control (enable and provision of keys) | expand

Commit Message

Jorge Ramirez-Ortiz Feb. 9, 2021, 7:34 p.m. UTC
From: Igor Opaniuk <igor.opaniuk@foundries.io>

Add initial test coverage for SCP03 command.

Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
---
 test/py/tests/test_scp03.py | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 test/py/tests/test_scp03.py
diff mbox series

Patch

diff --git a/test/py/tests/test_scp03.py b/test/py/tests/test_scp03.py
new file mode 100644
index 0000000000..2b584db24d
--- /dev/null
+++ b/test/py/tests/test_scp03.py
@@ -0,0 +1,27 @@ 
+# Copyright (c) 2021, Foun
+#
+# SPDX-License-Identifier:  GPL-2.0+
+#
+# SCP03 command test
+
+"""
+This tests SCP03 command in U-boot.
+
+For additional details check doc/usage/scp03.rst
+"""
+
+import pytest
+import u_boot_utils as util
+
+@pytest.mark.buildconfigspec('cmd_scp03')
+def test_scp03(u_boot_console):
+    """Enable and provision keys with SCP03
+    """
+
+    success_str1 = "SCP03 is enabled"
+    success_str2 = "SCP03 is provisioned"
+
+    response = u_boot_console.run_command('scp03 enable')
+    assert success_str1 in response
+    response = u_boot_console.run_command('scp03 provision')
+    assert success_str2 in response