@@ -18,15 +18,18 @@ if !Sys.iswindows()
1818 # start an interactive session, ensuring `TERM` is unset since it can trigger
1919 # different amounts of precompilation stemming from `base/terminfo.jl` depending
2020 # on the value, making the test here unreliable
21- cmd = addenv (` $(Base. julia_cmd ()[ 1 ] ) --trace-compile=$f -q --startup-file=no -i` ,
21+ cmd = addenv (` $(Base. julia_cmd ()) --trace-compile=$f -q --startup-file=no -i` ,
2222 Dict (" TERM" => " " ))
2323 pts, ptm = open_fake_pty ()
2424 p = run (cmd, pts, pts, pts; wait= false )
2525 Base. close_stdio (pts)
2626 std = readuntil (ptm, " julia>" )
2727 # check for newlines instead of equality with "julia>" because color may be on
2828 occursin (" \n " , std) && @info " There was output before the julia prompt:\n $std "
29- sleep (1 ) # sometimes precompiles output just after prompt appears
29+ @async write (ptm, " \n " ) # another prompt
30+ readuntil (ptm, " julia>" )
31+ @async write (ptm, " \n " ) # another prompt
32+ readuntil (ptm, " julia>" )
3033 tracecompile_out = read (f, String)
3134 close (ptm) # close after reading so we don't get precompiles from error shutdown
3235
0 commit comments