[erlang-questions] How to capture all output to console during Common Test?

Vladimir Gordeev gordeev.vladimir.v@REDACTED
Wed Jun 14 13:17:15 CEST 2017


> Have you tried to do it?

Yeah, I captured by such manner all IO from custom erlang shell that I
started by shell:start/2.
I didn't tried to do it with Common Test though.

Here is module of my own IO server process, just for example:
https://gist.github.com/vladimir-vg/ab5a2096759e24e8f6d51386f043430e

On Tue, Jun 13, 2017 at 10:56 PM, Max Lapshin <max.lapshin@REDACTED> wrote:

>
>
> On Sat, Jun 10, 2017 at 10:14 AM, Vladimir Gordeev <
> gordeev.vladimir.v@REDACTED> wrote:
>
>> Well, it's possible to start your own Erlang IO server, start it in ct
>> hook during init, and then make it as a group leader for root ct process.
>>
>> http://erlang.org/doc/apps/stdlib/io_protocol.html
>>
>> So just start your own process that handles io_reply, io_request, and then
>>
>> erlang:group_leader(MyCustomIOServerPid, CtRootPid),
>>
>
>
> Have you tried to do it?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170614/3554b687/attachment.htm>


More information about the erlang-questions mailing list