MeshChatX/tests/backend/support/run_module_probe.py
2026-07-17 10:43:20 -05:00

22 lines
540 B
Python

# SPDX-License-Identifier: 0BSD
"""Probe module for --meshchatx-run-module live/subprocess tests."""
from __future__ import annotations
import os
import sys
def main() -> None:
marker = os.environ.get("MESHCHATX_RUN_MODULE_PROBE_PATH")
if marker:
with open(marker, "w", encoding="utf-8") as handle:
handle.write("ok\n")
handle.write(" ".join(sys.argv[1:]))
handle.write("\n")
print("meshchatx-run-module-probe", *sys.argv[1:], flush=True)
if __name__ == "__main__":
main()