issue #141 amend tests to make them work reasonably

nanojit
Dibyendu Majumdar 6 years ago
parent 416bdb960b
commit dc258d3724

@ -22,6 +22,8 @@ _soft = rawget(_G, "_soft") or false
_port = rawget(_G, "_port") or false
-- Make true to avoid messages about tests not performed
_nomsg = rawget(_G, "_nomsg") or false
-- JIT test mode, 1 = some time consuming tests skipped, 2 = all tests
_jit = rawget(_G, "_jit") or 1
local usertests = rawget(_G, "_U")
@ -150,9 +152,7 @@ end
report"gc.lua"
local f = assert(loadfile('gc.lua'))
if ravi then ravi.gcstep(0) end
f()
if ravi then ravi.gcstep(300) end
if not ravi or not ravi.auto() or ravi.tracehook() then
-- in JIT mode we need tracehook enabled
dofile('db.lua')

@ -278,7 +278,7 @@ local function createcases (n)
end
-- do not do too many combinations for soft tests
local level = _soft and 3 or 4
local level = (_soft or _jit == 1) and 3 or 4
cases[1] = basiccases
for i = 2, level do cases[i] = createcases(i) end
@ -294,6 +294,9 @@ for n = 1, level do
IX = false
assert(p() == v[2] and IX == not not v[2])
i = i + 1
if _jit > 0 and i % 1000 == 0 then
collectgarbage()
end
if i % 60000 == 0 then print('+') end
end
end

Loading…
Cancel
Save