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

Method test_analyze_map_file

ci/tests/test_symbol_analysis.py:418–448  ·  view source on GitHub ↗

Test map file analysis if available.

(self)

Source from the content-addressed store, hash-verified

416
417 @unittest.skipUnless(_ENABLED, "Tests disabled - set _ENABLED = True to run")
418 def test_analyze_map_file(self) -> None:
419 """Test map file analysis if available."""
420 print("Testing map file analysis...")
421
422 # Try to find a map file
423 elf_file_path = Path(self.board_info["prog_path"])
424 map_file = elf_file_path.with_suffix(".map")
425
426 if not map_file.exists():
427 print(f"Map file not found at {map_file}, skipping map analysis test")
428 return
429
430 # Analyze the map file
431 dependencies = analyze_map_file(map_file)
432
433 # Verify result structure
434 self.assertIsInstance(dependencies, dict)
435
436 if dependencies:
437 print(f"Found {len(dependencies)} modules in map file")
438 # Verify structure of dependencies
439 for module, symbols in dependencies.items():
440 self.assertIsInstance(module, str)
441 self.assertIsInstance(symbols, list)
442
443 # Print a sample for debugging
444 sample_modules = list(dependencies.keys())[:3]
445 for module in sample_modules:
446 print(f" {module}: {len(dependencies[module])} symbols")
447 else:
448 print("No dependencies found in map file (this may be normal)")
449
450 @unittest.skipUnless(_ENABLED, "Tests disabled - set _ENABLED = True to run")
451 def test_build_reverse_call_graph(self) -> None:

Callers

nothing calls this directly

Calls 5

analyze_map_fileFunction · 0.90
listClass · 0.85
itemsMethod · 0.80
printFunction · 0.50
keysMethod · 0.45

Tested by

no test coverage detected