Skip to content

Commit 1e09c13

Browse files
committed
Truncate unified log file at startup
Otherwise we can get mixed logs in the unified log file after running luatest a few times. No changelog because the feature was added by commit f8a1c10 ("Add logging to unified file"), which hasn't been released yet.
1 parent 24929a8 commit 1e09c13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

luatest/runner.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ function Runner.run(args, options)
6969
-- in the `output_beautifier` module: this module is connected to the
7070
-- the `server` module. We cannot link the `server` module to the `runner`
7171
-- module to explicitly give this parameter.
72-
local fh = fio.open(options.log_file, {'O_CREAT', 'O_WRONLY'}, tonumber('640', 8))
72+
local fh = fio.open(options.log_file, {'O_CREAT', 'O_WRONLY', 'O_TRUNC'},
73+
tonumber('640', 8))
7374
rawset(_G, 'log_file', {fh = fh})
7475

7576
local output_beautifier = OutputBeautifier:new({prefix = log_prefix})

0 commit comments

Comments
 (0)