blob: 414b4251a692fd7862089e56ea64980f3223cce3 [file] [log] [blame]
Igor Opaniuk905b1732021-02-14 16:27:28 +01001# Copyright (c) 2021 Foundries.io Ltd
2#
3# SPDX-License-Identifier: GPL-2.0+
4#
5# SCP03 command test
6
7"""
Michal Simek50fa1182023-05-17 09:17:16 +02008This tests SCP03 command in U-Boot.
Igor Opaniuk905b1732021-02-14 16:27:28 +01009
10For additional details check doc/usage/scp03.rst
11"""
12
13import pytest
Simon Glassdb0e4532025-02-09 09:07:16 -070014import utils
Igor Opaniuk905b1732021-02-14 16:27:28 +010015
16@pytest.mark.buildconfigspec('cmd_scp03')
Simon Glassddba5202025-02-09 09:07:14 -070017def test_scp03(ubman):
Igor Opaniuk905b1732021-02-14 16:27:28 +010018 """Enable and provision keys with SCP03
19 """
20
21 success_str1 = "SCP03 is enabled"
22 success_str2 = "SCP03 is provisioned"
23
Simon Glassddba5202025-02-09 09:07:14 -070024 response = ubman.run_command('scp03 enable')
Igor Opaniuk905b1732021-02-14 16:27:28 +010025 assert success_str1 in response
Simon Glassddba5202025-02-09 09:07:14 -070026 response = ubman.run_command('scp03 provision')
Igor Opaniuk905b1732021-02-14 16:27:28 +010027 assert success_str2 in response