26 lines
717 B
Python
26 lines
717 B
Python
|
|
#!/usr/bin/env python3
|
||
|
|
"""Minimal smoke test for disassembly_audit.py (#335)"""
|
||
|
|
|
||
|
|
import sys
|
||
|
|
from pathlib import Path
|
||
|
|
import json
|
||
|
|
import subprocess
|
||
|
|
|
||
|
|
script_path = Path(__file__).resolve().parent.parent / "bin" / "disassembly_audit.py"
|
||
|
|
|
||
|
|
result = subprocess.run(
|
||
|
|
[sys.executable, str(script_path), "--json"],
|
||
|
|
capture_output=True, text=True, timeout=20
|
||
|
|
)
|
||
|
|
if result.returncode != 0:
|
||
|
|
print(f"Script error: {result.stderr[:500]}")
|
||
|
|
sys.exit(1)
|
||
|
|
|
||
|
|
data = json.loads(result.stdout)
|
||
|
|
assert "zombies" in data
|
||
|
|
assert "unused_services" in data
|
||
|
|
assert "dead_loops_cron" in data
|
||
|
|
assert "dead_loops_hermes" in data
|
||
|
|
assert "cost_savings" in data
|
||
|
|
print("SMOKE TEST: disassembly_audit.py generates valid report structure")
|