[partition] Improve logging in automount test

- switch logging in job to VERBOSE because we don't want to be printing
  pointers to the regular session log
- switch logging in test to VERBOSE to actually see the messages from the Job
- hook the test into the build
This commit is contained in:
Adriaan de Groot 2021-02-03 00:46:34 +01:00
parent c98a330bf9
commit c43a6ab866
3 changed files with 10 additions and 2 deletions

View File

@ -25,7 +25,7 @@ AutoMountManagementJob::prettyName() const
Calamares::JobResult Calamares::JobResult
AutoMountManagementJob::exec() AutoMountManagementJob::exec()
{ {
cDebug() << "this" << Logger::Pointer( this ) << "value" << Logger::Pointer( m_stored.get() ); Logger::CDebug(Logger::LOGVERBOSE) << "this" << Logger::Pointer( this ) << "value" << Logger::Pointer( m_stored.get() );
if ( m_stored ) if ( m_stored )
{ {
CalamaresUtils::Partition::automountRestore( m_stored ); CalamaresUtils::Partition::automountRestore( m_stored );

View File

@ -37,7 +37,7 @@ AutoMountJobTests::AutoMountJobTests() {}
void void
AutoMountJobTests::testRunThrice() AutoMountJobTests::testRunThrice()
{ {
Logger::setupLogLevel( Logger::LOGDEBUG ); Logger::setupLogLevel( Logger::LOGVERBOSE );
auto original = CalamaresUtils::Partition::automountDisable( true ); auto original = CalamaresUtils::Partition::automountDisable( true );
cDebug() << "Got automount info" << Logger::Pointer( original.get() ); cDebug() << "Got automount info" << Logger::Pointer( original.get() );

View File

@ -58,3 +58,11 @@ calamares_add_test(
DEFINITIONS ${_partition_defs} DEFINITIONS ${_partition_defs}
) )
calamares_add_test(
automounttests
SOURCES
${PartitionModule_SOURCE_DIR}/jobs/AutoMountManagementJob.cpp
AutoMountTests.cpp
LIBRARIES
calamares
)