| 11740 | } |
| 11741 | |
| 11742 | void TrackerBase::close() { |
| 11743 | |
| 11744 | // Close any still open children (e.g. generators) |
| 11745 | while( &m_ctx.currentTracker() != this ) |
| 11746 | m_ctx.currentTracker().close(); |
| 11747 | |
| 11748 | switch( m_runState ) { |
| 11749 | case NeedsAnotherRun: |
| 11750 | break; |
| 11751 | |
| 11752 | case Executing: |
| 11753 | m_runState = CompletedSuccessfully; |
| 11754 | break; |
| 11755 | case ExecutingChildren: |
| 11756 | if( m_children.empty() || m_children.back()->isComplete() ) |
| 11757 | m_runState = CompletedSuccessfully; |
| 11758 | break; |
| 11759 | |
| 11760 | case NotStarted: |
| 11761 | case CompletedSuccessfully: |
| 11762 | case Failed: |
| 11763 | CATCH_INTERNAL_ERROR( "Illogical state: " << m_runState ); |
| 11764 | |
| 11765 | default: |
| 11766 | CATCH_INTERNAL_ERROR( "Unknown state: " << m_runState ); |
| 11767 | } |
| 11768 | moveToParent(); |
| 11769 | m_ctx.completeCycle(); |
| 11770 | } |
| 11771 | void TrackerBase::fail() { |
| 11772 | m_runState = Failed; |
| 11773 | if( m_parent ) |
no test coverage detected