aboutsummaryrefslogtreecommitdiff
path: root/test/py/tests/test_efi_capsule/test_capsule_firmware_fit.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/py/tests/test_efi_capsule/test_capsule_firmware_fit.py')
-rw-r--r--test/py/tests/test_efi_capsule/test_capsule_firmware_fit.py35
1 files changed, 17 insertions, 18 deletions
diff --git a/test/py/tests/test_efi_capsule/test_capsule_firmware_fit.py b/test/py/tests/test_efi_capsule/test_capsule_firmware_fit.py
index d28b53a1a1..9ee152818d 100644
--- a/test/py/tests/test_efi_capsule/test_capsule_firmware_fit.py
+++ b/test/py/tests/test_efi_capsule/test_capsule_firmware_fit.py
@@ -1,16 +1,13 @@
# SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2020, Linaro Limited
# Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
-#
-# U-Boot UEFI: Firmware Update Test
-"""
+"""U-Boot UEFI: Firmware Update Test
This test verifies capsule-on-disk firmware update for FIT images
"""
-from subprocess import check_call, check_output, CalledProcessError
import pytest
-from capsule_defs import *
+from capsule_defs import CAPSULE_DATA_DIR, CAPSULE_INSTALL_DIR
@pytest.mark.boardspec('sandbox_flattree')
@@ -24,15 +21,18 @@ from capsule_defs import *
@pytest.mark.buildconfigspec('cmd_nvedit_efi')
@pytest.mark.buildconfigspec('cmd_sf')
@pytest.mark.slow
-class TestEfiCapsuleFirmwareFit(object):
+class TestEfiCapsuleFirmwareFit():
+ """Test capsule-on-disk firmware update for FIT images
+ """
+
def test_efi_capsule_fw1(
self, u_boot_config, u_boot_console, efi_capsule_data):
- """
- Test Case 1 - Update U-Boot and U-Boot environment on SPI Flash
- but with an incorrect GUID value in the capsule
- No update should happen
- 0x100000-0x150000: U-Boot binary (but dummy)
- 0x150000-0x200000: U-Boot environment (but dummy)
+ """Test Case 1
+ Update U-Boot and U-Boot environment on SPI Flash
+ but with an incorrect GUID value in the capsule
+ No update should happen
+ 0x100000-0x150000: U-Boot binary (but dummy)
+ 0x150000-0x200000: U-Boot environment (but dummy)
"""
# other tests might have run and the
# system might not be in a clean state.
@@ -74,8 +74,6 @@ class TestEfiCapsuleFirmwareFit(object):
capsule_early = u_boot_config.buildconfig.get(
'config_efi_capsule_on_disk_early')
- capsule_auth = u_boot_config.buildconfig.get(
- 'config_efi_capsule_authenticate')
# reboot
u_boot_console.restart_uboot(expect_reset = capsule_early)
@@ -107,11 +105,12 @@ class TestEfiCapsuleFirmwareFit(object):
def test_efi_capsule_fw2(
self, u_boot_config, u_boot_console, efi_capsule_data):
+ """Test Case 2
+ Update U-Boot and U-Boot environment on SPI Flash
+ 0x100000-0x150000: U-Boot binary (but dummy)
+ 0x150000-0x200000: U-Boot environment (but dummy)
"""
- Test Case 2 - Update U-Boot and U-Boot environment on SPI Flash
- 0x100000-0x150000: U-Boot binary (but dummy)
- 0x150000-0x200000: U-Boot environment (but dummy)
- """
+
disk_img = efi_capsule_data
with u_boot_console.log.section('Test Case 2-a, before reboot'):
output = u_boot_console.run_command_list([