Persist test names to the cache file as a compact JSON array. Stores only test name strings (not the full meson introspect dict) to keep the file small (~6 KB) and parse time minimal (~5 ms).
(build_dir: Path, test_names: list[str])
| 56 | |
| 57 | |
| 58 | def _save_introspect_tests_cache(build_dir: Path, test_names: list[str]) -> None: |
| 59 | """Persist test names to the cache file as a compact JSON array. |
| 60 | |
| 61 | Stores only test name strings (not the full meson introspect dict) to |
| 62 | keep the file small (~6 KB) and parse time minimal (~5 ms). |
| 63 | """ |
| 64 | cache_path = build_dir / ".meson_introspect_tests_cache.json" |
| 65 | try: |
| 66 | cache_path.write_text(json.dumps(test_names), encoding="utf-8") |
| 67 | except OSError: |
| 68 | pass # Non-critical: fast-path simply won't fire on the next run |
| 69 | |
| 70 | |
| 71 | def get_fuzzy_test_candidates(build_dir: Path, test_name: str) -> list[str]: |
no outgoing calls
no test coverage detected