From f8019dde90f845c409503104aa5652f5689c8d0d Mon Sep 17 00:00:00 2001 From: "torlando-agent[bot]" <281092095+torlando-agent[bot]@users.noreply.github.com> Date: Fri, 19 Jun 2026 15:59:37 -0400 Subject: [PATCH] test: fix echo-bot interpreter + drop dead var (greptile) start_echobot() hardcoded /usr/bin/python3 -- use sys.executable (the harness's own interpreter, which run_e2e.sh selects and which has rns/lxmf importable via the bot's repo-path insert), overridable with PYXIS_BOT_PY. Also remove the dead last_size variable in echobot_log_after(). Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01UWZuYkHBRqNb6BZHV8sTG5 --- tests/hardware/tdeck_harness.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/hardware/tdeck_harness.py b/tests/hardware/tdeck_harness.py index ba78db5a..190c5e41 100644 --- a/tests/hardware/tdeck_harness.py +++ b/tests/hardware/tdeck_harness.py @@ -71,6 +71,11 @@ TDECK_LOG = "/tmp/tdeck-harness-tdeck.log" ECHOBOT_LOG = "/tmp/echobot.log" ECHOBOT_PY = os.path.join(os.path.dirname(os.path.abspath(__file__)), "lxmf_echo_bot.py") +# Interpreter for the echo bot subprocess. Defaults to the same Python running +# this harness (which run_e2e.sh selects, and which already has rns/lxmf +# importable via the bot's repo-path insert). Override with PYXIS_BOT_PY if the +# bot needs a different interpreter than the harness. +BOT_PY = os.environ.get("PYXIS_BOT_PY") or sys.executable def ts(): @@ -225,7 +230,7 @@ def start_echobot(peer_hex=""): # rebroadcast limit was already reached when the bot connected. env["ECHOBOT_PEER_HEX"] = peer_hex proc = subprocess.Popen( - ["/usr/bin/python3", ECHOBOT_PY], + [BOT_PY, ECHOBOT_PY], stdout=fh, stderr=subprocess.STDOUT, env=env, ) @@ -289,7 +294,6 @@ def echobot_log_after(marker, predicate, timeout=30): after `marker` (a substring known to be present already, used to avoid matching old log entries from a previous round).""" deadline = time.time() + timeout - last_size = 0 while time.time() < deadline: try: with open(ECHOBOT_LOG) as f: