test: simplify ASAN detection

This commit is contained in:
dundargoc
2025-03-01 13:30:28 +01:00
committed by dundargoc
parent b45a44dd32
commit 59c328bc88
5 changed files with 6 additions and 20 deletions

View File

@@ -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)