diff --git a/src/libcalamares/Tests.cpp b/src/libcalamares/Tests.cpp index 102a18409..e8566887d 100644 --- a/src/libcalamares/Tests.cpp +++ b/src/libcalamares/Tests.cpp @@ -62,9 +62,13 @@ void LibCalamaresTests::testLoadSaveYaml() { QFile f( "settings.conf" ); + // Find the nearest settings.conf to read + for ( unsigned int up = 0; !f.exists() && ( up < 4 ); ++up ) + f.setFileName( QString( "../" ) + f.fileName() ); + cDebug() << QDir().absolutePath() << f.fileName() << f.exists(); QVERIFY( f.exists() ); - auto map = CalamaresUtils::loadYaml( "settings.conf" ); + auto map = CalamaresUtils::loadYaml( f.fileName() ); CalamaresUtils::saveYaml( "out.yaml", map ); auto other_map = CalamaresUtils::loadYaml( "out.yaml" ); diff --git a/src/modules/fsresizer/Tests.cpp b/src/modules/fsresizer/Tests.cpp index 8f6bb48c5..0da5d9dab 100644 --- a/src/modules/fsresizer/Tests.cpp +++ b/src/modules/fsresizer/Tests.cpp @@ -105,9 +105,9 @@ atleast: 127 % QVERIFY( !j.m_fsname.isEmpty() ); QVERIFY( !j.m_devicename.isEmpty() ); QCOMPARE( j.m_size.unit(), ResizeFSJob::RelativeUnit::Absolute ); - QCOMPARE( j.m_atleast.unit(), ResizeFSJob::RelativeUnit::Percent ); + QCOMPARE( j.m_atleast.unit(), ResizeFSJob::RelativeUnit::None ); QCOMPARE( j.m_size.value(), 72 ); - QCOMPARE( j.m_atleast.value(), 127 ); + QCOMPARE( j.m_atleast.value(), 0 ); // Silly config doc0 = YAML::Load( R"(--- diff --git a/src/modules/rawfs/rawfs.conf b/src/modules/rawfs/rawfs.conf index 6a314ce1b..10e654a7d 100644 --- a/src/modules/rawfs/rawfs.conf +++ b/src/modules/rawfs/rawfs.conf @@ -2,23 +2,23 @@ --- -# To apply a custom partition layout, it has to be defined this way : -# -# targets: -# - mountPoint: / -# source: / -# - mountPoint: /home -# source: /images/home.img -# resize: true -# - mountPoint: /data -# source: /dev/mmcblk0p3 +# To apply a custom partition layout, it has to be defined as a list of targets. # # For each target, the following attributes must be defined: # * mountPoint: The mount point of the destination device on the installed system # The corresponding block device will automatically be identified and used as the # destination for the operation # * source: The source filesystem; it can be the mount point of a locally (on the -# live system) mounted filesystem, a disk image, or a block device +# live system) mounted filesystem, a path to a disk image, or a block device # * resize (optional): Expand the destination filesystem to fill the whole # partition at the end of the operation; this works only with ext filesystems # for now + +targets: + - mountPoint: / + source: / + - mountPoint: /home + source: /images/home.img + resize: true + - mountPoint: /data + source: /dev/mmcblk0p3