Open Adnan-Elhammoudi opened 7 months ago
Hi,
yeah I have seen this exact problem in the past but never managed to build a proper solution for it... So what's happening is that the =>
inside the output of crc32 looks exactly like a U-Boot prompt to tbot. And that confuses the console parsing code...
I think a workaround that may help for the time being is to temporarily change the prompt matcher like this:
with ub.ch.with_prompt('\n=> '):
ub.exec0("crc32", ...)
If this doesn't work, you could implement the one command by hand:
cmd = self.escape("crc32", f"{fileaddr[0]}" ,f"{filesize[0]}")
with tbot.log_event.command(self.name, cmd) as ev:
self.ch.sendline(cmd + ";echo crcdone", read_back=True)
with self.ch.with_stream(ev, show_prompt=False):
out = self.ch.expect("crcdone")
self.ch.sendline("true")
self.ch.read_until_prompt()
ev.data["stdout"] = out
output = out
Let me know how it goes...
The workaround code snippet works for me!
with ub.ch.with_prompt('\n=> '):
ub.exec0("crc32", ...)
Thank you!
Hi!
This assertion is failing because
exec0
does not return the complete result, even though stdout does! Could you please advise me on how to ensure that the entire result is returned?