| 10204 | } |
| 10205 | |
| 10206 | void TrackerBase::close() { |
| 10207 | |
| 10208 | // Close any still open children (e.g. generators) |
| 10209 | while( &m_ctx.currentTracker() != this ) |
| 10210 | m_ctx.currentTracker().close(); |
| 10211 | |
| 10212 | switch( m_runState ) { |
| 10213 | case NeedsAnotherRun: |
| 10214 | break; |
| 10215 | |
| 10216 | case Executing: |
| 10217 | m_runState = CompletedSuccessfully; |
| 10218 | break; |
| 10219 | case ExecutingChildren: |
| 10220 | if( m_children.empty() || m_children.back()->isComplete() ) |
| 10221 | m_runState = CompletedSuccessfully; |
| 10222 | break; |
| 10223 | |
| 10224 | case NotStarted: |
| 10225 | case CompletedSuccessfully: |
| 10226 | case Failed: |
| 10227 | CATCH_INTERNAL_ERROR( "Illogical state: " << m_runState ); |
| 10228 | |
| 10229 | default: |
| 10230 | CATCH_INTERNAL_ERROR( "Unknown state: " << m_runState ); |
| 10231 | } |
| 10232 | moveToParent(); |
| 10233 | m_ctx.completeCycle(); |
| 10234 | } |
| 10235 | void TrackerBase::fail() { |
| 10236 | m_runState = Failed; |
| 10237 | if( m_parent ) |
no test coverage detected