mirror of
https://github.com/neovim/neovim.git
synced 2026-04-28 02:04:10 +00:00
test: simplify ASAN detection
This commit is contained in:
@@ -876,18 +876,6 @@ local function ptr2key(ptr)
|
||||
return ffi.string(s)
|
||||
end
|
||||
|
||||
local function is_asan()
|
||||
cimport('./src/nvim/version.h')
|
||||
local status, res = pcall(function()
|
||||
return lib.version_cflags
|
||||
end)
|
||||
if status then
|
||||
return ffi.string(res):match('-fsanitize=[a-z,]*address')
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
--- @class test.unit.testutil.module
|
||||
local M = {
|
||||
cimport = cimport,
|
||||
@@ -916,7 +904,6 @@ local M = {
|
||||
ptr2addr = ptr2addr,
|
||||
ptr2key = ptr2key,
|
||||
debug_log = debug_log,
|
||||
is_asan = is_asan,
|
||||
}
|
||||
--- @class test.unit.testutil: test.unit.testutil.module, test.testutil
|
||||
M = vim.tbl_extend('error', M, t_global)
|
||||
|
||||
Reference in New Issue
Block a user