int run() { if( m_configData.showHelp ) return 0; try { config(); // Force config to be constructed static const PSTRING version = "GITGLOBALID=" GIT_LAST_COMMIT_ABBRHASH; BaseAutorelease; printf("Git ID: %s\n", version+12); if(!m_configData.debugLevel.empty()) (new(AUTORELEASE)DebugManagerStdout)->setFilter(STR(m_configData.debugLevel.c_str(), -1)); gUnitTestDatabase.New(m_configData.md5DatabaseName.c_str(), m_configData.processName.c_str()); seedRng( *m_config ); // needed or not ?? if( m_configData.filenamesAsTags ) applyFilenamesAsTags( *m_config ); // Handle list request if( Option<std::size_t> listed = list( config() ) ) return static_cast<int>( *listed ); return static_cast<int>( runTests( m_config ).assertions.failed ); } catch( std::exception& ex ) { Catch::cerr() << ex.what() << std::endl; return (std::numeric_limits<int>::max)(); } }
int run() { if (m_configData.showHelp) return 0; try { config(); // Force config to be constructed seedRng(*m_config); if (m_configData.filenamesAsTags) applyFilenamesAsTags(*m_config); // Handle list request if (Option<std::size_t> listed = list(config())) return static_cast<int>( *listed ); return static_cast<int>( runTests(m_config).assertions.failed ); } catch (std::exception &ex) { Catch::cerr() << ex.what() << std::endl; return (std::numeric_limits<int>::max)(); } }