Kaynağa Gözat

Quit PluginFramework tests on test failure.

Sascha Zelzer 14 yıl önce
ebeveyn
işleme
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: