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