mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
sandbox: Add a test for SCSI
Add a simple uclass test for SCSI. It reads the partition table from a disk image and checks that it looks correct. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
46df024394
commit
22c80d5603
5 changed files with 58 additions and 0 deletions
|
@ -114,6 +114,15 @@ def test_ut_dm_init(u_boot_console):
|
|||
with open(fn, 'wb') as fh:
|
||||
fh.write(data)
|
||||
|
||||
# Create a file with a single partition
|
||||
fn = u_boot_console.config.source_dir + '/scsi.img'
|
||||
if not os.path.exists(fn):
|
||||
data = b'\x00' * (2 * 1024 * 1024)
|
||||
with open(fn, 'wb') as fh:
|
||||
fh.write(data)
|
||||
u_boot_utils.run_and_log(
|
||||
u_boot_console, f'sfdisk {fn}', stdin=b'type=83')
|
||||
|
||||
@pytest.mark.buildconfigspec('cmd_bootflow')
|
||||
def test_ut_dm_init_bootstd(u_boot_console):
|
||||
"""Initialise data for bootflow tests"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue