From 265469c9cd2ce91b07782d0a758e4532d9fb5594 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sun, 30 Jun 2024 17:34:44 +0200 Subject: [PATCH] explain-verbose-test --- src/libcalamares/utils/Tests.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libcalamares/utils/Tests.cpp b/src/libcalamares/utils/Tests.cpp index acd6ee2c0..81877029b 100644 --- a/src/libcalamares/utils/Tests.cpp +++ b/src/libcalamares/utils/Tests.cpp @@ -501,7 +501,6 @@ LibCalamaresTests::testCommandVerbose() const QString testExecutable = tempRoot.filePath( "example.sh" ); cDebug() << "Creating example executable" << testExecutable; - { QFile f( testExecutable ); QVERIFY( f.open( QIODevice::WriteOnly ) ); @@ -510,6 +509,11 @@ LibCalamaresTests::testCommandVerbose() 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"; { Calamares::CommandList l( false ); // no chroot @@ -524,7 +528,6 @@ LibCalamaresTests::testCommandVerbose() } cDebug() << "Running command verbosely"; - { Calamares::CommandList l( false ); // no chroot Calamares::CommandLine c( testExecutable, {}, std::chrono::seconds( 2 ) );