Auto-reset hard/soft for further cycles
[anna.git] / source / testing / TestCase.cpp
index f8d7a98..d048dfc 100644 (file)
@@ -211,6 +211,12 @@ bool TestCase::reset(bool hard) throw() {
   // Soft reset if finished:
   if (!hard /* is soft reset */  && !isFinished()) return false;
 
+  // Dump as failed if still in progress (hard reset):
+  if (getState() == State::InProgress) {
+    addDebugSummaryHint("Testcase hard reset while in progress");
+    setState(State::Failed);
+  }
+
   // Clean stage ////////////////////////////
   // id is kept
   std::vector<TestStep*>::iterator it;