|
|
|
@ -24,7 +24,6 @@
|
|
|
|
|
#include <core/KPMHelpers.h>
|
|
|
|
|
|
|
|
|
|
// CalaPM
|
|
|
|
|
#include <CalaPM.h>
|
|
|
|
|
#include <backend/corebackend.h>
|
|
|
|
|
#include <backend/corebackendmanager.h>
|
|
|
|
|
#include <fs/filesystemfactory.h>
|
|
|
|
@ -166,7 +165,7 @@ PartitionJobTests::initTestCase()
|
|
|
|
|
QSKIP( "Skipping test, CALAMARES_TEST_DISK is not set. It should point to a disk which can be safely formatted" );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QVERIFY( CalaPM::init() );
|
|
|
|
|
QVERIFY( KPMHelpers::initKPMcore() );
|
|
|
|
|
FileSystemFactory::init();
|
|
|
|
|
|
|
|
|
|
refreshDevice();
|
|
|
|
@ -212,7 +211,7 @@ PartitionJobTests::newCreatePartitionJob( Partition* freeSpacePartition, Partiti
|
|
|
|
|
qint64 lastSector;
|
|
|
|
|
|
|
|
|
|
if ( size > 0 )
|
|
|
|
|
lastSector = firstSector + size / m_device->logicalSectorSize();
|
|
|
|
|
lastSector = firstSector + size / m_device->logicalSize();
|
|
|
|
|
else
|
|
|
|
|
lastSector = freeSpacePartition->lastSector();
|
|
|
|
|
FileSystem* fs = FileSystemFactory::create( type, firstSector, lastSector );
|
|
|
|
@ -335,7 +334,7 @@ PartitionJobTests::testResizePartition()
|
|
|
|
|
QFETCH( int, newStartMB );
|
|
|
|
|
QFETCH( int, newSizeMB );
|
|
|
|
|
|
|
|
|
|
const qint64 sectorForMB = MB / m_device->logicalSectorSize();
|
|
|
|
|
const qint64 sectorForMB = MB / m_device->logicalSize();
|
|
|
|
|
|
|
|
|
|
qint64 oldFirst = sectorForMB * oldStartMB;
|
|
|
|
|
qint64 oldLast = oldFirst + sectorForMB * oldSizeMB - 1;
|
|
|
|
|