Lines Matching +full:skip +full:- +full:config
1 # SPDX-License-Identifier: GPL-2.0+
21 """Enable --fs-type option.
26 parser: Pytest command-line parser.
31 parser.addoption('--fs-type', action='append', default=None,
34 def pytest_configure(config): argument
37 A file system explicitly named with --fs-type option is selected
42 config: Pytest configuration.
55 supported_fs = config.getoption('fs_type')
92 """Convert a file system type to an U-boot specific string
95 or a config name in u-boot. Currently fat16 and fat32 are handled
109 def check_ubconfig(config, fs_type): argument
110 """Check whether a file system is enabled in u-boot configuration.
122 if not config.buildconfig.get('config_cmd_%s' % fs_type, None):
123 pytest.skip('.config feature "CMD_%s" not enabled' % fs_type.upper())
124 if not config.buildconfig.get('config_%s_write' % fs_type, None):
125 pytest.skip('.config feature "%s_WRITE" not enabled'
128 def mk_fs(config, fs_type, size, id): argument
140 fs_img = config.persistent_data_dir + '/' + fs_img
143 mkfs_opt = '-F 16'
145 mkfs_opt = '-F 32'
154 count = (size + 1048576 - 1) / 1048576
157 check_call('rm -f %s' % fs_img, shell=True)
164 call('rm -f %s' % fs_img, shell=True)
202 check_call('guestmount -a %s -m /dev/sda %s'
209 check_call('sudo mount -o %s %s %s'
234 # derived from test/fs/fs-test.sh
236 # NOTE: yield_fixture was deprecated since pytest-3.0
243 u_boot_config: U-boot configuration.
266 check_call('mkdir -p %s' % mount_dir, shell=True)
289 # check_call('rm -f "%s.w"' % MB1, shell=True)
290 # check_call('rm -f "%s.w2"' % MB1, shell=True)
294 'dd if=%s bs=1M skip=0 count=1 2> /dev/null | md5sum'
301 'dd if=%s bs=1M skip=0 count=1 2> /dev/null | md5sum'
307 'dd if=%s bs=1M skip=2499 count=1 2> /dev/null | md5sum'
313 'dd if=%s bs=1M skip=2047 count=1 2> /dev/null | md5sum'
319 'dd if=%s bs=1M skip=2048 count=1 2> /dev/null | md5sum'
325 'dd if=%s bs=512K skip=4095 count=2 2> /dev/null | md5sum'
331 pytest.skip('Setup failed for filesystem: ' + fs_type)
339 call('rm -f %s' % fs_img, shell=True)
344 # NOTE: yield_fixture was deprecated since pytest-3.0
351 u_boot_config: U-boot configuration.
374 check_call('mkdir -p %s' % mount_dir, shell=True)
418 pytest.skip('Setup failed for filesystem: ' + fs_type)
426 call('rm -f %s' % fs_img, shell=True)
431 # NOTE: yield_fixture was deprecated since pytest-3.0
438 u_boot_config: U-boot configuration.
454 pytest.skip('Setup failed for filesystem: ' + fs_type)
459 call('rm -f %s' % fs_img, shell=True)
464 # NOTE: yield_fixture was deprecated since pytest-3.0
471 u_boot_config: U-boot configuration.
491 check_call('mkdir -p %s' % mount_dir, shell=True)
517 pytest.skip('Setup failed for filesystem: ' + fs_type)
525 call('rm -f %s' % fs_img, shell=True)