explain-verbose-test

This commit is contained in:
Adriaan de Groot 2024-06-30 17:34:44 +02:00
parent e6de798228
commit 265469c9cd

View File

@ -501,7 +501,6 @@ LibCalamaresTests::testCommandVerbose()
const QString testExecutable = tempRoot.filePath( "example.sh" ); const QString testExecutable = tempRoot.filePath( "example.sh" );
cDebug() << "Creating example executable" << testExecutable; cDebug() << "Creating example executable" << testExecutable;
{ {
QFile f( testExecutable ); QFile f( testExecutable );
QVERIFY( f.open( QIODevice::WriteOnly ) ); QVERIFY( f.open( QIODevice::WriteOnly ) );
@ -510,6 +509,11 @@ LibCalamaresTests::testCommandVerbose()
Calamares::Permissions::apply( testExecutable, 0755 ); Calamares::Permissions::apply( testExecutable, 0755 );
} }
// Note that, because of the blocking way run() works,
// in this single-threaded test with no event loop,
// there's nothing for the verbose version to connect
// to for sending output.
cDebug() << "Running command non-verbose"; cDebug() << "Running command non-verbose";
{ {
Calamares::CommandList l( false ); // no chroot Calamares::CommandList l( false ); // no chroot
@ -524,7 +528,6 @@ LibCalamaresTests::testCommandVerbose()
} }
cDebug() << "Running command verbosely"; cDebug() << "Running command verbosely";
{ {
Calamares::CommandList l( false ); // no chroot Calamares::CommandList l( false ); // no chroot
Calamares::CommandLine c( testExecutable, {}, std::chrono::seconds( 2 ) ); Calamares::CommandLine c( testExecutable, {}, std::chrono::seconds( 2 ) );