diff --git a/quotest/quotest.cpp b/quotest/quotest.cpp index 890245d2..5c7e5be5 100644 --- a/quotest/quotest.cpp +++ b/quotest/quotest.cpp @@ -966,11 +966,12 @@ void TestManager::finalize(const QString& lastWords) c->logout().then( this, [this, lastWords] { clog << lastWords.toStdString() << endl; - QCoreApplication::exit(!testSuite ? -3 + auto result = !testSuite ? -3 : succeeded.empty() && failed.empty() && running.empty() ? -4 - : static_cast(failed.size() + running.size())); + : static_cast(failed.size() + running.size()); + QCoreApplication::exit(result); }); }