mirror of https://github.com/google/benchmark.git
Disable debug-only test in release builds to avoid expected failures. (#1595)
Co-authored-by: Andy Christiansen <achristiansen@google.com>
This commit is contained in:
parent
2dd015dfef
commit
318dd44225
|
@ -76,7 +76,16 @@ void BM_diagnostic_test_keep_running(benchmark::State& state) {
|
|||
BENCHMARK(BM_diagnostic_test_keep_running);
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
#ifdef NDEBUG
|
||||
// This test is exercising functionality for debug builds, which are not
|
||||
// available in release builds. Skip the test if we are in that environment
|
||||
// to avoid a test failure.
|
||||
std::cout << "Diagnostic test disabled in release build" << std::endl;
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
#else
|
||||
benchmark::internal::GetAbortHandler() = &TestHandler;
|
||||
benchmark::Initialize(&argc, argv);
|
||||
benchmark::RunSpecifiedBenchmarks();
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue