Skip to content

Commit edb5a5d

Browse files
vtjnashKristofferC
authored andcommitted
REPL,test: add stdout monitor task
Might help aarch64bot test deadlock on CI Refs #38996 (cherry picked from commit 2497ad1)
1 parent 62fe04c commit edb5a5d

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

stdlib/REPL/test/repl.jl

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,20 @@ fake_repl(options = REPL.Options(confirm_exit=false,hascolor=true)) do stdin_wri
104104
let cmd = "\"Hello REPL\""
105105
write(stdin_write, "$(curmod_prefix)inc || wait($(curmod_prefix)b); r = $cmd; notify($(curmod_prefix)c); r\r")
106106
end
107-
inc = true
108-
notify(b)
109-
wait(c)
107+
let t = @async begin
108+
inc = true
109+
notify(b)
110+
wait(c)
111+
end
112+
while (d = readline(stdout_read)) != ""
113+
# first line [optional]: until 80th char of input
114+
# second line: until end of input
115+
# third line: "Hello REPL"
116+
# last line: blank
117+
# last+1 line: next prompt
118+
end
119+
wait(t)
120+
end
110121

111122
# Latex completions
112123
write(stdin_write, "\x32\\alpha\t")

0 commit comments

Comments
 (0)