| 343 | } |
| 344 | |
| 345 | void TJUnitProcessor::SignalHandler(int signal) { |
| 346 | if (CurrentJUnitProcessor) { |
| 347 | if (CurrentJUnitProcessor->CurrentTest) { |
| 348 | TError errDesc; |
| 349 | errDesc.test = *CurrentJUnitProcessor->CurrentTest; |
| 350 | if (signal == SIGABRT) { |
| 351 | errDesc.msg = "Test aborted"; |
| 352 | } else { |
| 353 | errDesc.msg = "Segmentation fault"; |
| 354 | PrintBackTrace(); |
| 355 | } |
| 356 | CurrentJUnitProcessor->OnError(&errDesc); |
| 357 | |
| 358 | TFinish finishDesc; |
| 359 | finishDesc.Success = false; |
| 360 | finishDesc.test = *CurrentJUnitProcessor->CurrentTest; |
| 361 | CurrentJUnitProcessor->OnFinish(&finishDesc); |
| 362 | } |
| 363 | |
| 364 | CurrentJUnitProcessor->Save(); |
| 365 | |
| 366 | if (signal == SIGABRT) { |
| 367 | if (CurrentJUnitProcessor->PrevAbortHandler) { |
| 368 | CurrentJUnitProcessor->PrevAbortHandler(signal); |
| 369 | } |
| 370 | } else { |
| 371 | if (CurrentJUnitProcessor->PrevSegvHandler) { |
| 372 | CurrentJUnitProcessor->PrevSegvHandler(signal); |
| 373 | } |
| 374 | } |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | void TJUnitProcessor::SerializeToFile() { |
| 379 | switch (OutputFormat) { |
nothing calls this directly
no test coverage detected