mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
test/win: skip vargs memory usage on Github Actions
This test can fail on any of the Windows builds because Github Actions does not provide enough stability and enough memory for all runners.. Check test requirements before running any test cases to avoid duplicate checks.
This commit is contained in:
@@ -10,6 +10,29 @@ local source = helpers.source
|
||||
local poke_eventloop = helpers.poke_eventloop
|
||||
local uname = helpers.uname
|
||||
local load_adjust = helpers.load_adjust
|
||||
local isCI = helpers.isCI
|
||||
|
||||
local function isasan()
|
||||
local version = eval('execute("version")')
|
||||
return version:match('-fsanitize=[a-z,]*address')
|
||||
end
|
||||
|
||||
clear()
|
||||
if isasan() then
|
||||
pending('ASAN build is difficult to estimate memory usage', function() end)
|
||||
return
|
||||
elseif iswin() then
|
||||
if isCI('github') then
|
||||
pending('Windows runners in Github Actions do not have a stable environment to estimate memory usage', function() end)
|
||||
return
|
||||
elseif eval("executable('wmic')") == 0 then
|
||||
pending('missing "wmic" command', function() end)
|
||||
return
|
||||
end
|
||||
elseif eval("executable('ps')") == 0 then
|
||||
pending('missing "ps" command', function() end)
|
||||
return
|
||||
end
|
||||
|
||||
local monitor_memory_usage = {
|
||||
memory_usage = function(self)
|
||||
@@ -71,11 +94,6 @@ describe('memory usage', function()
|
||||
end
|
||||
end
|
||||
|
||||
local function isasan()
|
||||
local version = eval('execute("version")')
|
||||
return version:match('-fsanitize=[a-z,]*address')
|
||||
end
|
||||
|
||||
before_each(clear)
|
||||
|
||||
--[[
|
||||
@@ -83,15 +101,6 @@ describe('memory usage', function()
|
||||
just after it finishes.
|
||||
]]--
|
||||
it('function capture vargs', function()
|
||||
if isasan() then
|
||||
pending('ASAN build is difficult to estimate memory usage')
|
||||
end
|
||||
if iswin() and eval("executable('wmic')") == 0 then
|
||||
pending('missing "wmic" command')
|
||||
elseif eval("executable('ps')") == 0 then
|
||||
pending('missing "ps" command')
|
||||
end
|
||||
|
||||
local pid = eval('getpid()')
|
||||
local before = monitor_memory_usage(pid)
|
||||
source([[
|
||||
@@ -125,15 +134,6 @@ describe('memory usage', function()
|
||||
increase so much even when rerun Xtest.vim since system memory caches.
|
||||
]]--
|
||||
it('function capture lvars', function()
|
||||
if isasan() then
|
||||
pending('ASAN build is difficult to estimate memory usage')
|
||||
end
|
||||
if iswin() and eval("executable('wmic')") == 0 then
|
||||
pending('missing "wmic" command')
|
||||
elseif eval("executable('ps')") == 0 then
|
||||
pending('missing "ps" command')
|
||||
end
|
||||
|
||||
local pid = eval('getpid()')
|
||||
local before = monitor_memory_usage(pid)
|
||||
local fname = source([[
|
||||
|
||||
Reference in New Issue
Block a user