diff options
Diffstat (limited to 'test/py')
-rw-r--r-- | test/py/tests/test_fs/test_fs_cmd.py | 2 | ||||
-rw-r--r-- | test/py/tests/test_fs/test_squashfs/sqfs_common.py | 9 | ||||
-rw-r--r-- | test/py/tests/test_part.py | 2 | ||||
-rw-r--r-- | test/py/u_boot_console_base.py | 4 |
4 files changed, 10 insertions, 7 deletions
diff --git a/test/py/tests/test_fs/test_fs_cmd.py b/test/py/tests/test_fs/test_fs_cmd.py index ba39a53159e..700cf3591de 100644 --- a/test/py/tests/test_fs/test_fs_cmd.py +++ b/test/py/tests/test_fs/test_fs_cmd.py @@ -6,7 +6,7 @@ import pytest @pytest.mark.boardspec('sandbox') @pytest.mark.buildconfigspec('cmd_fs_generic') -def test_dm_compat(u_boot_console): +def test_fstypes(u_boot_console): """Test that `fstypes` prints a result which includes `sandbox`.""" output = u_boot_console.run_command('fstypes') assert "Supported filesystems:" in output diff --git a/test/py/tests/test_fs/test_squashfs/sqfs_common.py b/test/py/tests/test_fs/test_squashfs/sqfs_common.py index 8b84c2cdca8..d1621dcce3a 100644 --- a/test/py/tests/test_fs/test_squashfs/sqfs_common.py +++ b/test/py/tests/test_fs/test_squashfs/sqfs_common.py @@ -146,15 +146,14 @@ def get_mksquashfs_version(): out = subprocess.run(['mksquashfs -version'], shell=True, check=True, capture_output=True, text=True) # 'out' is: mksquashfs version X (yyyy/mm/dd) ... - return float(out.stdout.split()[2].split('-')[0]) + return out.stdout.split()[2].split('.')[0:2] def check_mksquashfs_version(): """ Checks if mksquashfs meets the required version. """ - required_version = 4.4 - if get_mksquashfs_version() < required_version: - print('Error: mksquashfs is too old.') - print('Required version: {}'.format(required_version)) + version = get_mksquashfs_version(); + if int(version[0]) < 4 or int(version[0]) == 4 and int(version[1]) < 4 : + print('Error: mksquashfs is too old, required version: 4.4') raise AssertionError def make_all_images(build_dir): diff --git a/test/py/tests/test_part.py b/test/py/tests/test_part.py index cba98045101..2b5184654db 100644 --- a/test/py/tests/test_part.py +++ b/test/py/tests/test_part.py @@ -7,7 +7,7 @@ import pytest @pytest.mark.buildconfigspec('cmd_part') @pytest.mark.buildconfigspec('partitions') @pytest.mark.buildconfigspec('efi_partition') -def test_dm_compat(u_boot_console): +def test_part_types(u_boot_console): """Test that `part types` prints a result which includes `EFI`.""" output = u_boot_console.run_command('part types') assert "Supported partition tables:" in output diff --git a/test/py/u_boot_console_base.py b/test/py/u_boot_console_base.py index 58ec859b34f..26b6de07f88 100644 --- a/test/py/u_boot_console_base.py +++ b/test/py/u_boot_console_base.py @@ -400,6 +400,10 @@ class ConsoleBase(object): """ if self.p: + # Reset the console timeout value as some tests may change + # its default value during the execution + if not self.config.gdbserver: + self.p.timeout = 30000 return try: self.log.start_section('Starting U-Boot') |