// 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;
addStep(step);
}
-void TestCase::addWaitRegexp(bool fromEntity, const std::string ®exp) throw(anna::RuntimeException) {
+void TestCase::addWaitRegexpHex(bool fromEntity, const std::string ®exp) throw(anna::RuntimeException) {
+ assertInitialized();
+
+ TestStepWait *step = new TestStepWait(this);
+ step->setConditionRegexpHex(fromEntity, regexp);
+
+ LOGINFORMATION(
+ if (hasSameCondition(step->getCondition()))
+ anna::Logger::information(anna::functions::asString("The same wait condition has already been programmed in this test case (%llu). Are you sure ?", a_id), ANNA_FILE_LOCATION);
+ );
+
+ addStep(step);
+}
+
+void TestCase::addWaitRegexpXml(bool fromEntity, const std::string ®exp) throw(anna::RuntimeException) {
assertInitialized();
TestStepWait *step = new TestStepWait(this);
- step->setCondition(fromEntity, regexp);
+ step->setConditionRegexpXml(fromEntity, regexp);
LOGINFORMATION(
if (hasSameCondition(step->getCondition()))