Should now push non 0 exit codes
This commit is contained in:
parent
d50c187710
commit
8c2bde7ed8
2
init.lua
2
init.lua
@ -2445,7 +2445,7 @@ end
|
||||
multi.OnError=multi:newConnection()
|
||||
multi.OnPreLoad = multi:newConnection()
|
||||
multi.OnExit = multi:newConnection(nil,nil,true)
|
||||
multi.m = {onexit = function() multi.OnExit:Fire() end}
|
||||
multi.m = {onexit = function() os.exit() end}
|
||||
|
||||
if _VERSION >= "Lua 5.2" or jit then
|
||||
setmetatable(multi.m, {__gc = multi.m.onexit})
|
||||
|
||||
@ -174,12 +174,17 @@ runTest = thread:newFunction(function()
|
||||
multi.error("Connection Test 3: Error removing connection")
|
||||
end
|
||||
if not love then
|
||||
local ec = 0
|
||||
multi.print("Testing pseudo threading")
|
||||
os.execute("lua tests/threadtests.lua p")
|
||||
ec = ec + os.execute("lua tests/threadtests.lua p")
|
||||
multi.print("Testing lanes threading")
|
||||
os.execute("lua tests/threadtests.lua l")
|
||||
ec = ec + os.execute("lua tests/threadtests.lua l")
|
||||
if ec > 0 then
|
||||
os.exit(1)
|
||||
else
|
||||
os.exit()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
local handle = runTest()
|
||||
|
||||
@ -255,6 +255,7 @@ multi:newThread("Scheduler Thread",function()
|
||||
end).OnError(multi.error)
|
||||
|
||||
multi.OnExit(function(err_or_errorcode)
|
||||
print("Error Code: ", err_or_errorcode)
|
||||
if not we_good then
|
||||
multi.info("There was an error running some tests!")
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user