Re: [PATCHv5 6/6] test: py: add initial coverage for scp03 cmd

2021-03-15 Thread Tom Rini
On Sun, Feb 14, 2021 at 04:27:28PM +0100, Jorge Ramirez-Ortiz wrote:

> From: Igor Opaniuk 
> 
> Add initial test coverage for SCP03 command.
> 
> Signed-off-by: Igor Opaniuk 
> Reviewed-by: Simon Glass 

Applied to u-boot/next, thanks!

-- 
Tom


signature.asc
Description: PGP signature


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

2021-02-14 Thread Jorge Ramirez-Ortiz
From: Igor Opaniuk 

Add initial test coverage for SCP03 command.

Signed-off-by: Igor Opaniuk 
Reviewed-by: Simon Glass 
---
 test/py/tests/test_scp03.py | 27 +++
 1 file changed, 27 insertions(+)
 create mode 100644 test/py/tests/test_scp03.py

diff --git a/test/py/tests/test_scp03.py b/test/py/tests/test_scp03.py
new file mode 100644
index 00..1f689252dd
--- /dev/null
+++ b/test/py/tests/test_scp03.py
@@ -0,0 +1,27 @@
+# Copyright (c) 2021 Foundries.io Ltd
+#
+# 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
-- 
2.30.0



Re: [PATCHv5 6/6] test: py: add initial coverage for scp03 cmd

2021-02-12 Thread Simon Glass
Hi Jorge,

On Tue, 9 Feb 2021 at 13:10, Jorge Ramirez-Ortiz  wrote:
>
> From: Igor Opaniuk 
>
> Add initial test coverage for SCP03 command.
>
> Signed-off-by: Igor Opaniuk 
> ---
>  test/py/tests/test_scp03.py | 27 +++
>  1 file changed, 27 insertions(+)
>  create mode 100644 test/py/tests/test_scp03.py

Reviewed-by: Simon Glass 

This is fine, but note you can also write this test in C for sandbox,
and this might be easier if it gets more complicated. For example you
can check the state of devices from C.

Regards,
Simon


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

2021-02-09 Thread Jorge Ramirez-Ortiz
From: Igor Opaniuk 

Add initial test coverage for SCP03 command.

Signed-off-by: Igor Opaniuk 
---
 test/py/tests/test_scp03.py | 27 +++
 1 file changed, 27 insertions(+)
 create mode 100644 test/py/tests/test_scp03.py

diff --git a/test/py/tests/test_scp03.py b/test/py/tests/test_scp03.py
new file mode 100644
index 00..1f689252dd
--- /dev/null
+++ b/test/py/tests/test_scp03.py
@@ -0,0 +1,27 @@
+# Copyright (c) 2021 Foundries.io Ltd
+#
+# 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
-- 
2.30.0