| 12012 | } |
| 12013 | |
| 12014 | void TrackerBase::close() { |
| 12015 | |
| 12016 | // Close any still open children (e.g. generators) |
| 12017 | while( &m_ctx.currentTracker() != this ) |
| 12018 | m_ctx.currentTracker().close(); |
| 12019 | |
| 12020 | switch( m_runState ) { |
| 12021 | case NeedsAnotherRun: |
| 12022 | break; |
| 12023 | |
| 12024 | case Executing: |
| 12025 | m_runState = CompletedSuccessfully; |
| 12026 | break; |
| 12027 | case ExecutingChildren: |
| 12028 | if( m_children.empty() || m_children.back()->isComplete() ) |
| 12029 | m_runState = CompletedSuccessfully; |
| 12030 | break; |
| 12031 | |
| 12032 | case NotStarted: |
| 12033 | case CompletedSuccessfully: |
| 12034 | case Failed: |
| 12035 | CATCH_INTERNAL_ERROR( "Illogical state: " << m_runState ); |
| 12036 | |
| 12037 | default: |
| 12038 | CATCH_INTERNAL_ERROR( "Unknown state: " << m_runState ); |
| 12039 | } |
| 12040 | moveToParent(); |
| 12041 | m_ctx.completeCycle(); |
| 12042 | } |
| 12043 | void TrackerBase::fail() { |
| 12044 | m_runState = Failed; |
| 12045 | if( m_parent ) |
no test coverage detected