MCPcopy Create free account
hub / github.com/catboost/catboost / SignalHandler

Method SignalHandler

library/cpp/testing/unittest/junit.cpp:345–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343}
344
345void 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
378void TJUnitProcessor::SerializeToFile() {
379 switch (OutputFormat) {

Callers

nothing calls this directly

Calls 4

PrintBackTraceFunction · 0.85
OnErrorMethod · 0.45
OnFinishMethod · 0.45
SaveMethod · 0.45

Tested by

no test coverage detected