test_scp03.py 638 B

123456789101112131415161718192021222324252627
  1. # Copyright (c) 2021 Foundries.io Ltd
  2. #
  3. # SPDX-License-Identifier: GPL-2.0+
  4. #
  5. # SCP03 command test
  6. """
  7. This tests SCP03 command in U-boot.
  8. For additional details check doc/usage/scp03.rst
  9. """
  10. import pytest
  11. import u_boot_utils as util
  12. @pytest.mark.buildconfigspec('cmd_scp03')
  13. def test_scp03(u_boot_console):
  14. """Enable and provision keys with SCP03
  15. """
  16. success_str1 = "SCP03 is enabled"
  17. success_str2 = "SCP03 is provisioned"
  18. response = u_boot_console.run_command('scp03 enable')
  19. assert success_str1 in response
  20. response = u_boot_console.run_command('scp03 provision')
  21. assert success_str2 in response