+bool TestCase::safeToClear() {
+
+ // Check if any step is running (command steps):
+ std::vector<TestStep*>::const_iterator it;
+ for (it = a_steps.begin(); it != a_steps.end(); it++) {
+ if ((*it)->getType() == TestStep::Type::Cmd) {
+ const TestStepCmd *tscmd = static_cast<const TestStepCmd*>(*it);
+ if(tscmd->threadRunning())
+ return false;
+ }
+ }
+
+ return true;
+}
+