Auto-reset hard/soft for further cycles
[anna.git] / source / testing / TestManager.cpp
index 8c0ea81..6aeae9f 100644 (file)
@@ -98,6 +98,9 @@ TestManager::TestManager() :
   a_clock = NULL;
   //a_testPool.clear();
   //a_statSummary.clear();
+
+  a_autoResetHard = false;
+
   a_currentTestIt = a_testPool.end();
 }
 
@@ -358,8 +361,8 @@ bool TestManager::nextTestCase() throw() {
       }
     }
 
-    // Soft reset to initialize already finished (in previous cycle) test cases:
-    a_currentTestIt->second->reset(false);
+    // Hard reset or soft reset to initialize already finished (in previous cycle) test cases:
+    a_currentTestIt->second->reset(a_autoResetHard);
 
     // Process test case:
     LOGDEBUG(anna::Logger::debug(anna::functions::asString("Processing test case id = %llu, currently '%s' state", a_currentTestIt->first, TestCase::asText(a_currentTestIt->second->getState())), ANNA_FILE_LOCATION));
@@ -509,6 +512,7 @@ throw() {
   result->createAttribute("DumpFailedReports", (a_dumpFailedReports ? "yes":"no"));
   result->createAttribute("DumpSuccessReports", (a_dumpSuccessReports ? "yes":"no"));
   result->createAttribute("DumpHexMessages", (a_dumpHexMessages ? "yes":"no"));
+  result->createAttribute("AutoResetHard", (a_autoResetHard ? "yes":"no"));
   result->createAttribute("ReportsDirectory", a_reportsDirectory);
   if (a_clock) {
     result->createAttribute("AsynchronousSendings", a_synchronousAmount);