[rawfs] Minor testing support
- set *bogus* to do no harm - add some test configurations
This commit is contained in:
parent
dc87c11ac4
commit
74fb88f9ac
@ -96,6 +96,8 @@ class RawFSItem:
|
|||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
libcalamares.utils.debug("Copying {} to {}".format(self.source, self.destination))
|
libcalamares.utils.debug("Copying {} to {}".format(self.source, self.destination))
|
||||||
|
if libcalamares.job.configuration["bogus"]:
|
||||||
|
return
|
||||||
|
|
||||||
srcsize, srcblksize = get_device_size(self.source)
|
srcsize, srcblksize = get_device_size(self.source)
|
||||||
destsize, destblksize = get_device_size(self.destination)
|
destsize, destblksize = get_device_size(self.destination)
|
||||||
|
@ -22,3 +22,8 @@ targets:
|
|||||||
resize: true
|
resize: true
|
||||||
- mountPoint: /data
|
- mountPoint: /data
|
||||||
source: /dev/mmcblk0p3
|
source: /dev/mmcblk0p3
|
||||||
|
|
||||||
|
# To support testing, set the *bogus* key to true. No actual work is done, but the
|
||||||
|
# module's logic is exercised.
|
||||||
|
|
||||||
|
# bogus: false
|
||||||
|
9
src/modules/rawfs/tests/1.global
Normal file
9
src/modules/rawfs/tests/1.global
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
rootMountPoint: /tmp/unpackfs-test-run-rootdir3/
|
||||||
|
partitions:
|
||||||
|
- mountPoint: /
|
||||||
|
device: /dev/sda1
|
||||||
|
fs: ext4
|
||||||
|
- mountPoint: /home
|
||||||
|
device: /dev/sda2
|
||||||
|
fs: ext4
|
14
src/modules/rawfs/tests/1.job
Normal file
14
src/modules/rawfs/tests/1.job
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Testing configuration for rawfs
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
targets:
|
||||||
|
- mountPoint: /
|
||||||
|
source: /
|
||||||
|
- mountPoint: /home
|
||||||
|
source: /images/home.img
|
||||||
|
resize: true
|
||||||
|
- mountPoint: /data
|
||||||
|
source: /dev/mmcblk0p3
|
||||||
|
|
||||||
|
bogus: true
|
Loading…
Reference in New Issue
Block a user