Merge pull request #3689 from myk002/myk_test

fix tests sometimes timing out in ci
develop
Myk 2023-08-21 02:00:13 -07:00 committed by GitHub
commit e8481a4489
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

@ -162,16 +162,19 @@ end
local function ensure_title_screen()
for i = 1, 100 do
local scr = dfhack.gui.getCurViewscreen()
if is_title_screen(scr) then
if df.viewscreen_initial_prepst:is_instance(scr) then
delay(10000)
elseif is_title_screen(scr) then
print('Found title screen')
return
end
else
scr:feed_key(df.interface_key.LEAVESCREEN)
delay(10)
end
if i % 10 == 0 then print('Looking for title screen...') end
end
qerror(string.format('Could not find title screen (timed out at %s)',
dfhack.gui.getCurFocus(true)))
dfhack.gui.getCurFocus(true)[1]))
end
local function is_fortress(focus_string)