Add Switch 2 wake capture and replay

This commit is contained in:
Joey Yakimowich-Payne 2026-09-04 23:27:02 -06:00
commit 6f58d345e0
22 changed files with 1436 additions and 3 deletions

View file

@ -0,0 +1,28 @@
import shutil
import subprocess
from pathlib import Path
def test_switch2_wake_native(tmp_path: Path) -> None:
root = Path(__file__).resolve().parents[1]
compiler = shutil.which("c++") or shutil.which("g++")
assert compiler is not None, "a host C++ compiler is required"
executable = tmp_path / "switch2_wake_test"
subprocess.run(
[
compiler,
"-std=c++17",
"-Wall",
"-Wextra",
"-Werror",
"-pedantic",
f"-I{root / 'tests' / 'switch2_wake_native_stubs'}",
f"-I{root / 'src' / 'firmware'}",
str(root / "tests" / "switch2_wake_test.cpp"),
"-o",
str(executable),
],
check=True,
cwd=root,
)
subprocess.run([str(executable)], check=True, cwd=root)