MCPcopy Create free account
hub / github.com/FastLED/FastLED / get_split_source_hashes

Function get_split_source_hashes

ci/meson/test_discovery.py:257–280  ·  view source on GitHub ↗

Get separate hashes for src/ and tests/ directories. Returns: SplitSourceHashes with src_hash, tests_hash, src_files, and test_files.

(source_dir: Path)

Source from the content-addressed store, hash-verified

255
256
257def get_split_source_hashes(source_dir: Path) -> SplitSourceHashes:
258 """
259 Get separate hashes for src/ and tests/ directories.
260
261 Returns:
262 SplitSourceHashes with src_hash, tests_hash, src_files, and test_files.
263 """
264 try:
265 src_files = _discover_files_in_dir(source_dir, "src")
266 test_files = _discover_files_in_dir(source_dir, "tests")
267 return SplitSourceHashes(
268 src_hash=_hash_file_list(src_files),
269 tests_hash=_hash_file_list(test_files),
270 src_files=src_files,
271 test_files=test_files,
272 )
273 except KeyboardInterrupt as ki:
274 handle_keyboard_interrupt(ki)
275 raise
276 except Exception as e:
277 _ts_print(f"[MESON] Warning: Failed to get source file hashes: {e}")
278 return SplitSourceHashes(
279 src_hash="", tests_hash="", src_files=[], test_files=[]
280 )
281
282
283def list_all_tests(

Callers 1

compute_source_hashesFunction · 0.90

Calls 4

_discover_files_in_dirFunction · 0.85
SplitSourceHashesClass · 0.85
_hash_file_listFunction · 0.85

Tested by

no test coverage detected