forked from beyond-all-reason/Beyond-All-Reason
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinfologtest.lua
More file actions
58 lines (51 loc) · 1.46 KB
/
Copy pathinfologtest.lua
File metadata and controls
58 lines (51 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
-- 'hidden' test checking infolog.txt for errors, used by headless runs.
local maxErrors = 10
function skip()
-- TODO: re-enable. disabled 2025-10-01 in order to get CICD working
return true
end
local function skipErrors(line)
if string.find(line, 'Could not finalize projectile-texture atlas', nil, true) then
return true
end
if string.find(line, 'Could not finalize Decals', nil, true) then
return true
end
if string.find(line, 'Could not finalize groundFX texture', nil, true) then
return true
end
-- Errors for engine >= 2025.03.X deprecations, remove these
-- at a later date when they're removed from BAR too.
if string.find(line, '"AnimationMT" is read-only', nil, true) then
return true
end
if string.find(line, '"UpdateBoundingVolumeMT" is read-only', nil, true) then
return true
end
if string.find(line, '"UpdateWeaponVectorsMT" is read-only', nil, true) then
return true
end
end
local function infologTest()
local errors = {}
local infolog = VFS.LoadFile("infolog.txt")
if infolog then
local fileLines = string.lines(infolog)
for i, line in ipairs(fileLines) do
local errorIndex = line:match('^%[t=[%d%.:]*%]%[f=[%-%d]*%] Error().*')
if errorIndex and errorIndex > 0 and not skipErrors(line) then
errors[#errors+1] = line
if #errors > maxErrors then
return errors
end
end
end
end
return errors
end
function test()
local errors = infologTest()
if #errors > 0 then
error(table.concat(errors, "\n"), 0)
end
end