runtests: prefix with the testsuite and worker number#60372
runtests: prefix with the testsuite and worker number#60372IanButterworth wants to merge 5 commits intoJuliaLang:masterfrom
Conversation
|
What am I looking for as a difference |
|
It's not currently working Should look like |
|
I think it's looking good, but not sure if the changes to Distributed are the best way to do it i.e. via a global hook.. |
2c97cc6 to
77d6444
Compare
77d6444 to
6661852
Compare
|
@JamesWrigley would you mind reviewing this and JuliaLang/Distributed.jl#157 |
|
Sure, will try to give it a look over the weekend 👍 |
|
@JamesWrigley did you have any feedback on this? thanks |
|
My apologies, I forgot 🙈 Will take a look tomorrow. |
JamesWrigley
left a comment
There was a problem hiding this comment.
My apologies, I forgot 🙈 Will take a look tomorrow.
In my defense I had food poisoning last week 🤣
| redirect_stdout(pipe) do | ||
| redirect_stderr(pipe) do | ||
| f() | ||
| end | ||
| end |
There was a problem hiding this comment.
Nitpicking:
| redirect_stdout(pipe) do | |
| redirect_stderr(pipe) do | |
| f() | |
| end | |
| end | |
| redirect_stdio(; stdout=pipe, stderr=pipe) do | |
| f() | |
| end |
| try | ||
| while isopen(pipe) || bytesavailable(pipe) > 0 | ||
| line = readline(pipe; keep=true) | ||
| isempty(line) && break |
| end | ||
| finally | ||
| close(pipe.in) | ||
| wait(reader_task) |
There was a problem hiding this comment.
Probably happens automatically through the finalizer but just to be safe:
| wait(reader_task) | |
| wait(reader_task) | |
| close(pipe) |
| test_name = wrkr_id === nothing ? nothing : get(worker_current_test, wrkr_id, nothing) | ||
| @lock print_lock begin | ||
| if test_name !== nothing | ||
| printstyled(" ", test_name, " (", ident, "): ", color=:light_black) |
There was a problem hiding this comment.
Ah I think I now see why you wanted the callback to control printing 😅 Could we maybe use StyledStrings for this? Would that handle printing stuff correctly to an IO that may or may not support colors?
Depends on JuliaLang/Distributed.jl#157
Shows the test suite name as the output prefix to make it easier to figure out which test it came from
https://buildkite.com/julialang/julia-master/builds/52736#019b13f7-46fa-4266-8d65-b785869b9c06/954-1074