[libcalamares] Fix tests failures from JobQueue asserts
Some compile flags changed recently, triggering assert() in the jobqueue when there is more than one. There's no real reason for JobQueue to be a singleton, but it wants to be. So clean up pointers a little more enthusiastically.
This commit is contained in:
parent
621ac9b8db
commit
0bad5469fc
@ -249,6 +249,7 @@ JobQueue::~JobQueue()
|
|||||||
}
|
}
|
||||||
|
|
||||||
delete m_storage;
|
delete m_storage;
|
||||||
|
s_instance = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ class SmartStatus;
|
|||||||
QTEST_GUILESS_MAIN( CreateLayoutsTests )
|
QTEST_GUILESS_MAIN( CreateLayoutsTests )
|
||||||
|
|
||||||
static CalamaresUtils::Partition::KPMManager* kpmcore = nullptr;
|
static CalamaresUtils::Partition::KPMManager* kpmcore = nullptr;
|
||||||
|
static Calamares::JobQueue* jobqueue = nullptr;
|
||||||
|
|
||||||
using CalamaresUtils::operator""_MiB;
|
using CalamaresUtils::operator""_MiB;
|
||||||
using CalamaresUtils::operator""_GiB;
|
using CalamaresUtils::operator""_GiB;
|
||||||
@ -39,7 +40,7 @@ CreateLayoutsTests::CreateLayoutsTests()
|
|||||||
void
|
void
|
||||||
CreateLayoutsTests::init()
|
CreateLayoutsTests::init()
|
||||||
{
|
{
|
||||||
std::unique_ptr< Calamares::JobQueue > jobqueue_p( new Calamares::JobQueue( nullptr ) );
|
jobqueue = new Calamares::JobQueue( nullptr );
|
||||||
kpmcore = new CalamaresUtils::Partition::KPMManager();
|
kpmcore = new CalamaresUtils::Partition::KPMManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,6 +48,7 @@ void
|
|||||||
CreateLayoutsTests::cleanup()
|
CreateLayoutsTests::cleanup()
|
||||||
{
|
{
|
||||||
delete kpmcore;
|
delete kpmcore;
|
||||||
|
delete jobqueue;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user