23 lines
806 B
Python
23 lines
806 B
Python
"""Native Chromium integration of the real main-timer header and F2 gate."""
|
|
from pathlib import Path
|
|
import os
|
|
import shutil
|
|
import subprocess
|
|
|
|
import pytest
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
@pytest.mark.parametrize("case", ["header_operator_f2", "header_viewer_clock"])
|
|
def test_auxiliary_header(case):
|
|
node = shutil.which("node")
|
|
assert node, "Node is required"
|
|
runtime_root = Path(os.environ.get("BUILD199_RUNTIME_ROOT", ROOT))
|
|
result = subprocess.run(
|
|
[node, str(ROOT / "tests/build199_aux_header.cjs"), case, str(runtime_root)],
|
|
cwd=ROOT, capture_output=True, text=True, timeout=40,
|
|
)
|
|
assert result.returncode == 0, result.stdout + result.stderr
|
|
assert f"PASS BUILD199 auxiliary header: {case}" in result.stdout, result.stdout + result.stderr
|