Pārlūkot izejas kodu

Quit PluginFramework tests on test failure.

Sascha Zelzer 14 gadi atpakaļ
vecāks
revīzija
797c95b41d

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

@@ -51,11 +51,14 @@ public:
 
 
     QList<ctkServiceReference> refs = context->getServiceReferences<ctkTestSuiteInterface>();
     QList<ctkServiceReference> refs = context->getServiceReferences<ctkTestSuiteInterface>();
 
 
+    int result = 0;
     foreach(ctkServiceReference ref, refs)
     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:
 private: