When streaming reported success but ran 0 tests, fall back to ``meson test``.
(
ctx: StreamingContext,
sr,
)
| 167 | |
| 168 | |
| 169 | def _streaming_no_tests_fallback( |
| 170 | ctx: StreamingContext, |
| 171 | sr, |
| 172 | ) -> MesonTestResult: |
| 173 | """When streaming reported success but ran 0 tests, fall back to ``meson test``.""" |
| 174 | if ctx.verbose: |
| 175 | print_info("[MESON] Build up-to-date, running existing tests...") |
| 176 | ctx.build_timer.checkpoint("compile_done") |
| 177 | |
| 178 | result = run_meson_test( |
| 179 | ctx.build_dir, |
| 180 | test_name=None, |
| 181 | verbose=ctx.verbose, |
| 182 | exclude_suites=ctx.exclude_suites, |
| 183 | ) |
| 184 | |
| 185 | ctx.build_timer.checkpoint("test_execution_done") |
| 186 | ctx.build_timer.calculate_phases() |
| 187 | test_only_duration = result.duration |
| 188 | result.duration = time.time() - ctx.start_time |
| 189 | result.meson_setup_time = ctx.build_timer.meson_setup_time |
| 190 | result.ninja_maintenance_time = ctx.build_timer.ninja_maintenance_time |
| 191 | result.compile_time = ctx.build_timer.compile_time |
| 192 | result.test_execution_time = test_only_duration |
| 193 | |
| 194 | _apply_compile_sub_phases(result, sr.compile_sub_phases) |
| 195 | if not result.success and ctx.log_failures is not None: |
| 196 | _write_testlog_failures(ctx.build_dir, ctx.log_failures) |
| 197 | return result |
| 198 | |
| 199 | |
| 200 | def _handle_streaming_failure( |
no test coverage detected