# Copyright (c) 2026 Storm Dragon # SPDX-License-Identifier: GPL-3.0-or-later """Build the fake USB transport from the selected shared reader core.""" from pathlib import Path import subprocess def build_usb_fixture(libraryRoot): repository = Path(__file__).resolve().parents[1] transportDir = subprocess.check_output( ["go", "list", "-f", "{{.Dir}}", "git.stormux.org/storm/screenreader-common/hardware/transport"], cwd=repository, text=True, ).strip() subprocess.run( ["cc", "-shared", "-fPIC", "-o", str(libraryRoot / "libusb-1.0.so.0"), str(Path(transportDir) / "testdata/usb_fixture.c")], check=True, )