mirror of
https://github.com/torlando-tech/pyxis.git
synced 2026-08-06 18:59:52 +00:00
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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UWZuYkHBRqNb6BZHV8sTG5
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
f0a78f70e1
commit
f8019dde90
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user