Partitionmanager: fix PM-tests build

main
Adriaan de Groot 8 years ago
parent 7ebbcc33b2
commit 8708260689

@ -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…
Cancel
Save