test: check for ASAN properly (#24224)

Follow-up to #24195.
This commit is contained in:
zeertzjq 2023-07-02 08:05:02 +08:00 committed by GitHub
parent bbaee29add
commit 54807231c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ local is_os = helpers.is_os
local is_ci = helpers.is_ci
local function isasan()
local version = eval('execute("version")')
local version = eval('execute("verbose version")')
return version:match('-fsanitize=[a-z,]*address')
end

View File

@ -168,7 +168,7 @@ endfunc
" Command to check for not running under ASAN
command CheckNotAsan call CheckNotAsan()
func CheckNotAsan()
if execute('version') =~# '-fsanitize=[a-z,]*\<address\>'
if execute('verbose version') =~# '-fsanitize=[a-z,]*\<address\>'
throw 'Skipped: does not work with ASAN'
endif
endfunc