1
A few integration tests we can run while the migration to python is not
2
complete. They probably require root or access to specific block devices so
1
A few integration tests we can run to test things on a higher level.
2
These will probably require root or access to specific block devices so
3
3
they are not meant to be automated.
5
5
# This should print nothing to stdout but will unpack the given binary
10
10
# Partition (for real!) /dev/sdb for a beagle board and return the devices
11
11
# for the boot and root partitions.
12
12
>>> from linaro_media_create.partitions import Media, setup_partitions
13
>>> setup_partitions('beagle', Media('/dev/sdb'), 32, None, 'boot',
14
... 'root', 'ext3', '2e82008e-1af3-4699-8521-3bf5bac1e67a', True,
13
>>> from linaro_media_create.boards import board_configs
15
... board_configs['beagle'], Media('/dev/sdb'), None, 'boot',
16
... 'root', 'ext3', True, True, True)
16
17
Checking that no-one is using this disk right now
18
19
('/dev/sdb1', '/dev/sdb2')
20
21
# Partition /tmp/beagle.img for a beagle board and return the loopback
21
22
# devices for the boot and root partitions.
22
>>> setup_partitions('beagle', Media('/tmp/beagle.img'), 32, '2G', 'boot',
23
... 'root', 'ext3', '2e82008e-1af3-4699-8521-3bf5bac1e67a', True,
24
... board_configs['beagle'], Media('/tmp/beagle.img'), '2G', 'boot',
25
... 'root', 'ext3', True, True, True)
25
26
Warning: /tmp/beagle.img is not a block device
27
28
('/dev/loop0', '/dev/loop1')