| 13828 | } |
| 13829 | |
| 13830 | void TrackerBase::close() { |
| 13831 | |
| 13832 | // Close any still open children (e.g. generators) |
| 13833 | while( &m_ctx.currentTracker() != this ) |
| 13834 | m_ctx.currentTracker().close(); |
| 13835 | |
| 13836 | switch( m_runState ) { |
| 13837 | case NeedsAnotherRun: |
| 13838 | break; |
| 13839 | |
| 13840 | case Executing: |
| 13841 | m_runState = CompletedSuccessfully; |
| 13842 | break; |
| 13843 | case ExecutingChildren: |
| 13844 | if( std::all_of(m_children.begin(), m_children.end(), [](ITrackerPtr const& t){ return t->isComplete(); }) ) |
| 13845 | m_runState = CompletedSuccessfully; |
| 13846 | break; |
| 13847 | |
| 13848 | case NotStarted: |
| 13849 | case CompletedSuccessfully: |
| 13850 | case Failed: |
| 13851 | CATCH_INTERNAL_ERROR( "Illogical state: " << m_runState ); |
| 13852 | |
| 13853 | default: |
| 13854 | CATCH_INTERNAL_ERROR( "Unknown state: " << m_runState ); |
| 13855 | } |
| 13856 | moveToParent(); |
| 13857 | m_ctx.completeCycle(); |
| 13858 | } |
| 13859 | void TrackerBase::fail() { |
| 13860 | m_runState = Failed; |
| 13861 | if( m_parent ) |
no test coverage detected