[rawfs] Minor testing support

- set *bogus* to do no harm
- add some test configurations
This commit is contained in:
Adriaan de Groot 2020-05-08 21:07:17 +02:00
parent dc87c11ac4
commit 74fb88f9ac
4 changed files with 30 additions and 0 deletions

View file

@ -96,6 +96,8 @@ class RawFSItem:
count = 0
libcalamares.utils.debug("Copying {} to {}".format(self.source, self.destination))
if libcalamares.job.configuration["bogus"]:
return
srcsize, srcblksize = get_device_size(self.source)
destsize, destblksize = get_device_size(self.destination)

View file

@ -22,3 +22,8 @@ targets:
resize: true
- mountPoint: /data
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

View 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

View 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