Partitionmanager: fix PM-tests build
This commit is contained in:
parent
49e0d0d504
commit
1479fc974e
@ -29,8 +29,8 @@ include_directories(
|
||||
ecm_add_test( ${partitionjobtests_SRCS}
|
||||
TEST_NAME partitionjobtests
|
||||
LINK_LIBRARIES
|
||||
calapm
|
||||
${CALAMARES_LIBRARIES}
|
||||
kpmcore
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
KF5::Service
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user