Explorar o código

Quit PluginFramework tests on test failure.

Sascha Zelzer %!s(int64=14) %!d(string=hai) anos
pai
achega
797c95b41d

+ 5 - 2
Libs/PluginFramework/Testing/Cpp/ctkPluginFrameworkTestMain.cpp

@@ -51,11 +51,14 @@ public:
 
     QList<ctkServiceReference> refs = context->getServiceReferences<ctkTestSuiteInterface>();
 
+    int result = 0;
     foreach(ctkServiceReference ref, refs)
     {
-      int result = QTest::qExec(context->getService(ref), argc, argv);
-      if (result > 0) QCoreApplication::exit(result);
+      result += QTest::qExec(context->getService(ref), argc, argv);
+      if (result > 0) break;
     }
+
+    if (result > 0) QCoreApplication::exit(result);
   }
 
 private: