diff options
Diffstat (limited to 'test/py')
-rw-r--r-- | test/py/requirements.txt | 2 | ||||
-rw-r--r-- | test/py/tests/test_efi_capsule/conftest.py | 6 | ||||
-rw-r--r-- | test/py/tests/test_efi_capsule/test_capsule_firmware_raw.py | 21 | ||||
-rw-r--r-- | test/py/tests/test_efi_capsule/version.dtso (renamed from test/py/tests/test_efi_capsule/version.dts) | 0 | ||||
-rw-r--r-- | test/py/tests/test_fpga.py | 12 |
5 files changed, 26 insertions, 15 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/conftest.py b/test/py/tests/test_efi_capsule/conftest.py index 80b12977d6f..61eab5112a1 100644 --- a/test/py/tests/test_efi_capsule/conftest.py +++ b/test/py/tests/test_efi_capsule/conftest.py @@ -53,7 +53,7 @@ def efi_capsule_data(request, u_boot_config): # Update dtb to add the version information check_call('cd %s; ' - 'cp %s/test/py/tests/test_efi_capsule/version.dts .' + 'cp %s/test/py/tests/test_efi_capsule/version.dtso .' % (data_dir, u_boot_config.source_dir), shell=True) if capsule_auth_enabled: @@ -61,13 +61,13 @@ def efi_capsule_data(request, u_boot_config): 'cp %s/arch/sandbox/dts/test.dtb test_sig.dtb' % (data_dir, u_boot_config.build_dir), shell=True) check_call('cd %s; ' - 'dtc -@ -I dts -O dtb -o version.dtbo version.dts; ' + 'dtc -@ -I dts -O dtb -o version.dtbo version.dtso; ' 'fdtoverlay -i test_sig.dtb ' '-o test_ver.dtb version.dtbo' % (data_dir), shell=True) else: check_call('cd %s; ' - 'dtc -@ -I dts -O dtb -o version.dtbo version.dts; ' + 'dtc -@ -I dts -O dtb -o version.dtbo version.dtso; ' 'fdtoverlay -i %s/arch/sandbox/dts/test.dtb ' '-o test_ver.dtb version.dtbo' % (data_dir, u_boot_config.build_dir), shell=True) 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_efi_capsule/version.dts b/test/py/tests/test_efi_capsule/version.dtso index 07850cc6064..07850cc6064 100644 --- a/test/py/tests/test_efi_capsule/version.dts +++ b/test/py/tests/test_efi_capsule/version.dtso 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') |