summaryrefslogtreecommitdiff
path: root/test/py
diff options
context:
space:
mode:
Diffstat (limited to 'test/py')
-rw-r--r--test/py/requirements.txt2
-rw-r--r--test/py/tests/test_efi_capsule/test_capsule_firmware_raw.py21
-rw-r--r--test/py/tests/test_fpga.py12
3 files changed, 23 insertions, 12 deletions
diff --git a/test/py/requirements.txt b/test/py/requirements.txt
index c1dd636931f..6d3030cf90c 100644
--- a/test/py/requirements.txt
+++ b/test/py/requirements.txt
@@ -27,4 +27,4 @@ testtools==2.3.0
traceback2==1.4.0
unittest2==1.1.0
wcwidth==0.1.7
-zipp==0.6.0
+zipp==3.19.2
diff --git a/test/py/tests/test_efi_capsule/test_capsule_firmware_raw.py b/test/py/tests/test_efi_capsule/test_capsule_firmware_raw.py
index a5b5c8a3853..f3a2dff5c2c 100644
--- a/test/py/tests/test_efi_capsule/test_capsule_firmware_raw.py
+++ b/test/py/tests/test_efi_capsule/test_capsule_firmware_raw.py
@@ -76,7 +76,7 @@ class TestEfiCapsuleFirmwareRaw:
self, u_boot_config, u_boot_console, efi_capsule_data):
""" Test Case 2
Update U-Boot and U-Boot environment on SPI Flash but with OsIndications unset
- No update should happen
+ No update should happen unless CONFIG_EFI_IGNORE_OSINDICATIONS is set
0x100000-0x150000: U-Boot binary (but dummy)
0x150000-0x200000: U-Boot environment (but dummy)
"""
@@ -91,16 +91,27 @@ class TestEfiCapsuleFirmwareRaw:
# reboot
u_boot_console.restart_uboot()
+ ignore_os_indications = u_boot_config.buildconfig.get(
+ 'config_efi_ignore_osindications')
+ need_reboot = True if ignore_os_indications else False
+
+ capsule_auth = u_boot_config.buildconfig.get(
+ 'config_efi_capsule_authenticate')
+
capsule_early = u_boot_config.buildconfig.get(
'config_efi_capsule_on_disk_early')
with u_boot_console.log.section('Test Case 2-b, after reboot'):
if not capsule_early:
- exec_manual_update(u_boot_console, disk_img, capsule_files, False)
+ exec_manual_update(u_boot_console, disk_img, capsule_files, need_reboot)
- check_file_exist(u_boot_console, disk_img, capsule_files)
+ if not ignore_os_indications:
+ check_file_exist(u_boot_console, disk_img, capsule_files)
- verify_content(u_boot_console, '100000', 'u-boot:Old')
- verify_content(u_boot_console, '150000', 'u-boot-env:Old')
+ expected = 'u-boot:New' if (ignore_os_indications and not capsule_auth) else 'u-boot:Old'
+ verify_content(u_boot_console, '100000', expected)
+
+ expected = 'u-boot-env:New' if (ignore_os_indications and not capsule_auth) else 'u-boot-env:Old'
+ verify_content(u_boot_console, '150000', expected)
def test_efi_capsule_fw3(
self, u_boot_config, u_boot_console, efi_capsule_data):
diff --git a/test/py/tests/test_fpga.py b/test/py/tests/test_fpga.py
index ca7ef8ea40d..460ff227f6f 100644
--- a/test/py/tests/test_fpga.py
+++ b/test/py/tests/test_fpga.py
@@ -256,7 +256,7 @@ def test_fpga_loadbp(u_boot_console):
@pytest.mark.buildconfigspec('cmd_fpga')
@pytest.mark.buildconfigspec('cmd_fpga_loadmk')
@pytest.mark.buildconfigspec('cmd_echo')
-@pytest.mark.buildconfigspec('image_format_legacy')
+@pytest.mark.buildconfigspec('legacy_image_format')
def test_fpga_loadmk_fail(u_boot_console):
f, dev, addr, bit, bit_size = load_file_from_var(u_boot_console, 'mkimage_legacy')
@@ -275,7 +275,7 @@ def test_fpga_loadmk_fail(u_boot_console):
@pytest.mark.buildconfigspec('cmd_fpga')
@pytest.mark.buildconfigspec('cmd_fpga_loadmk')
@pytest.mark.buildconfigspec('cmd_echo')
-@pytest.mark.buildconfigspec('image_format_legacy')
+@pytest.mark.buildconfigspec('legacy_image_format')
def test_fpga_loadmk_legacy(u_boot_console):
f, dev, addr, bit, bit_size = load_file_from_var(u_boot_console, 'mkimage_legacy')
@@ -289,7 +289,7 @@ def test_fpga_loadmk_legacy(u_boot_console):
@pytest.mark.buildconfigspec('cmd_fpga')
@pytest.mark.buildconfigspec('cmd_fpga_loadmk')
@pytest.mark.buildconfigspec('cmd_echo')
-@pytest.mark.buildconfigspec('image_format_legacy')
+@pytest.mark.buildconfigspec('legacy_image_format')
def test_fpga_loadmk_legacy_variable_fpga(u_boot_console):
f, dev, addr, bit, bit_size = load_file_from_var(u_boot_console, 'mkimage_legacy')
@@ -306,7 +306,7 @@ def test_fpga_loadmk_legacy_variable_fpga(u_boot_console):
@pytest.mark.buildconfigspec('cmd_fpga')
@pytest.mark.buildconfigspec('cmd_fpga_loadmk')
@pytest.mark.buildconfigspec('cmd_echo')
-@pytest.mark.buildconfigspec('image_format_legacy')
+@pytest.mark.buildconfigspec('legacy_image_format')
def test_fpga_loadmk_legacy_variable_fpgadata(u_boot_console):
f, dev, addr, bit, bit_size = load_file_from_var(u_boot_console, 'mkimage_legacy')
@@ -323,7 +323,7 @@ def test_fpga_loadmk_legacy_variable_fpgadata(u_boot_console):
@pytest.mark.buildconfigspec('cmd_fpga')
@pytest.mark.buildconfigspec('cmd_fpga_loadmk')
@pytest.mark.buildconfigspec('cmd_echo')
-@pytest.mark.buildconfigspec('image_format_legacy')
+@pytest.mark.buildconfigspec('legacy_image_format')
def test_fpga_loadmk_legacy_variable(u_boot_console):
f, dev, addr, bit, bit_size = load_file_from_var(u_boot_console, 'mkimage_legacy')
@@ -342,7 +342,7 @@ def test_fpga_loadmk_legacy_variable(u_boot_console):
@pytest.mark.buildconfigspec('cmd_fpga')
@pytest.mark.buildconfigspec('cmd_fpga_loadmk')
@pytest.mark.buildconfigspec('cmd_echo')
-@pytest.mark.buildconfigspec('image_format_legacy')
+@pytest.mark.buildconfigspec('legacy_image_format')
@pytest.mark.buildconfigspec('gzip')
def test_fpga_loadmk_legacy_gz(u_boot_console):
f, dev, addr, bit, bit_size = load_file_from_var(u_boot_console, 'mkimage_legacy_gz')