()
| 611 | return returncode, str(proc.stdout) |
| 612 | |
| 613 | def _clear_stale_caches() -> None: |
| 614 | _ts_print("[MESON] 🔄 Clearing stale test metadata caches...") |
| 615 | cache_files = [ |
| 616 | build_dir / "tests" / "test_metadata.cache", |
| 617 | build_dir / "test_list_cache.txt", |
| 618 | markers.source_files, |
| 619 | ] |
| 620 | for cache_file in cache_files: |
| 621 | if cache_file.exists(): |
| 622 | try: |
| 623 | cache_file.unlink() |
| 624 | _ts_print(f"[MESON] Deleted: {cache_file.name}") |
| 625 | except (OSError, IOError) as e: |
| 626 | _ts_print( |
| 627 | f"[MESON] Warning: Could not delete {cache_file.name}: {e}" |
| 628 | ) |
| 629 | |
| 630 | try: |
| 631 | cleanup_stale_meson_lockfile(build_dir) |
no test coverage detected