debugging in ci

This commit is contained in:
Eric 2023-11-20 15:09:21 +11:00
parent 1cc5f21da0
commit 18640e339b
No known key found for this signature in database

View File

@ -46,22 +46,14 @@ proc start(node: NodeProcess) =
proc waitUntilOutput*(node: NodeProcess, output: string) =
if node.debug:
raiseAssert "cannot read node output when in debug mode"
when defined(windows):
# sleep(5_000)
let lines = node.process.outputStream.lines.toSeq
echo ">>> lines count: ", lines.len
echo ">>> lines: ", lines
for l in lines:
if l.contains(output):
return
else:
for line in node.process.outputStream.lines:
if line.contains(output):
return
for line in node.process.outputStream.lines:
if line.contains(output):
return
raiseAssert "node did not output '" & output & "'"
proc waitUntilStarted*(node: NodeProcess) =
if node.debug:
if node.debug or defined(windows):
sleep(5_000)
else:
node.waitUntilOutput("Started codex node")