1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-28 10:29:03 +00:00

Allow make nse_check to pass when configured --without-openssl

This commit is contained in:
dmiller
2015-06-25 14:00:53 +00:00
parent 4aeabca374
commit f846e7c818
2 changed files with 16 additions and 7 deletions

View File

@@ -159,13 +159,17 @@ run_tests = function(to_test)
local fails = stdnse.output_table()
for _,lib in ipairs(to_test) do
stdnse.debug1("Testing %s", lib)
local thelib = require(lib)
local failed = 0
if rawget(thelib,"test_suite") ~= nil then
failed = thelib.test_suite()
end
if failed ~= 0 then
fails[lib] = failed
local status, thelib = pcall(require, lib)
if not status then
stdnse.debug1("Failed to load %s", lib)
else
local failed = 0
if rawget(thelib,"test_suite") ~= nil then
failed = thelib.test_suite()
end
if failed ~= 0 then
fails[lib] = failed
end
end
end
return fails