From f8bc40ba9105ccce166516311857e34fbbd2653d Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 27 Apr 2019 11:09:54 -0400 Subject: [PATCH] [calamares] (test-app) loadmodule exit code 1 on failures - If the module fails to load, or runs with an error, exit with code 1. --- src/calamares/testmain.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calamares/testmain.cpp b/src/calamares/testmain.cpp index 53ad871c9..195701024 100644 --- a/src/calamares/testmain.cpp +++ b/src/calamares/testmain.cpp @@ -216,6 +216,7 @@ main( int argc, char* argv[] ) cDebug() << "Job outputs:"; Calamares::JobList jobList = m->jobs(); + unsigned int failure_count = 0; unsigned int count = 1; for ( const auto& p : jobList ) { @@ -226,9 +227,10 @@ main( int argc, char* argv[] ) cError() << "Job #" << count << "failed" << TR( "summary", r.message() ) << TR( "details", r.details() ); + ++failure_count; } ++count; } - return 0; + return failure_count ? 1 : 0; }