| 13537 | } |
| 13538 | |
| 13539 | int Session::runInternal() { |
| 13540 | if( m_startupExceptions ) |
| 13541 | return 1; |
| 13542 | |
| 13543 | if (m_configData.showHelp || m_configData.libIdentify) { |
| 13544 | return 0; |
| 13545 | } |
| 13546 | |
| 13547 | CATCH_TRY { |
| 13548 | config(); // Force config to be constructed |
| 13549 | |
| 13550 | seedRng( *m_config ); |
| 13551 | |
| 13552 | if( m_configData.filenamesAsTags ) |
| 13553 | applyFilenamesAsTags( *m_config ); |
| 13554 | |
| 13555 | // Handle list request |
| 13556 | if( Option<std::size_t> listed = list( m_config ) ) |
| 13557 | return static_cast<int>( *listed ); |
| 13558 | |
| 13559 | TestGroup tests { m_config }; |
| 13560 | auto const totals = tests.execute(); |
| 13561 | |
| 13562 | if( m_config->warnAboutNoTests() && totals.error == -1 ) |
| 13563 | return 2; |
| 13564 | |
| 13565 | // Note that on unices only the lower 8 bits are usually used, clamping |
| 13566 | // the return value to 255 prevents false negative when some multiple |
| 13567 | // of 256 tests has failed |
| 13568 | return (std::min) (MaxExitCode, (std::max) (totals.error, static_cast<int>(totals.assertions.failed))); |
| 13569 | } |
| 13570 | #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) |
| 13571 | catch( std::exception& ex ) { |
| 13572 | Catch::cerr() << ex.what() << std::endl; |
nothing calls this directly
no test coverage detected