The patchset attempts to eliminate unnecessary bufferization and stdout/stderr streams mixing. It should improve observability in case of a failure (#119) and stability for tests that intensively writes to stderr (#392).
app+luatest: add -e "io.stdout:setvbuf('no')" to tarantool command-line arguments.
app+luatest: don't collect stdout in the memory till process termination, but write it directly to the temporary result file.
luatest: split stdout and stderr files to give the TAP13 parser more chances to understand the stdout correctly.
Fixes #119
Fixes #392
I test it on small examples like the following:
$ cat test/app-tap/foo.test.lua
#!/usr/bin/env tarantool
local tap = require('tap')
local test = tap.test('foo')
while true do
test:ok(true, 'foo foo foo')
io.stderr:write('bar bar bar\n')
require('fiber').sleep(1)
end
$ cat test/app-luatest/foo_test.lua
local t = require('luatest')
local g = t.group()
g.test_foo = function()
while true do
t.assert_equals(1, 1)
io.stderr:write('bar bar bar\n')
require('fiber').sleep(1)
end
end
The patchset attempts to eliminate unnecessary bufferization and stdout/stderr streams mixing. It should improve observability in case of a failure (#119) and stability for tests that intensively writes to stderr (#392).
-e "io.stdout:setvbuf('no')"
to tarantool command-line arguments.Fixes #119 Fixes #392
I test it on small examples like the following:
And I didn't verify it on the real world tests.
So, please, accept the patches with caution.