BenchmarkFilters: fix termination on bench error
closes: #540 (closed)
As noted in https://github.com/google/benchmark/pull/938 in older Google Benchmark versions, when state.SkipWithError
is used before the benchmark loop, the following assert error will be printed and the whole benchmark suite will exit.
src/benchmark_runner.cc:120: RunInThread: Check `st.iterations() >= st.max_iterations' failed. Benchmark returned before State::KeepRunning() returned false!
Note that the SkipWithError
happens since some benchmarks needs specific cmd flags (such as --tetra)
This solve this issue by:
- Simply removing the
return
after astate.SkipWithError
, this has no side effect since it will exit as soon as it enters the benchmark loop. - Fixing the issue (or feature) that triggers the
SkipWithError
by setting the right input per each of the benchmarks
Edited by Vicente Bolea