Is it possible to call Pkg.test
and make it capture all the output from the test process?
I’m trying something like the code below, but the tests run in a sandbox so I guess that’s why I’m unable to capture the output.
function fetch_logs(io)
buff = Vector{UInt8}(undef, bytesavailable(io))
readbytes!(io, buff)
return String(buff)
end
rd, wr = redirect_stdout()
Pkg.test()
write(log_file_io, fetch_logs(rd))