feat: add HIL diagnostics and meter health handling

This commit is contained in:
2026-08-17 22:33:04 +02:00
parent bc2ac6e8f6
commit aa25aa2c12
30 changed files with 2108 additions and 236 deletions
+33
View File
@@ -0,0 +1,33 @@
import subprocess
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
def test_production_meter_parser_and_collector(tmp_path):
executable = tmp_path / "meter_parser_test"
compile_result = subprocess.run(
[
"g++",
"-std=c++17",
"-Wall",
"-Wextra",
"-Werror",
f"-I{ROOT / 'include'}",
str(ROOT / "src" / "meter_health.cpp"),
str(ROOT / "src" / "meter_parser.cpp"),
str(ROOT / "hil_tests" / "meter_parser_harness.cpp"),
"-o",
str(executable),
],
check=False,
capture_output=True,
text=True,
)
assert compile_result.returncode == 0, compile_result.stderr
run_result = subprocess.run(
[str(executable)], check=False, capture_output=True, text=True
)
assert run_result.returncode == 0, run_result.stderr
assert "tests passed" in run_result.stdout