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.OnError=multi:newConnection()
|
||||||
multi.OnPreLoad = multi:newConnection()
|
multi.OnPreLoad = multi:newConnection()
|
||||||
multi.OnExit = multi:newConnection(nil,nil,true)
|
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
|
if _VERSION >= "Lua 5.2" or jit then
|
||||||
setmetatable(multi.m, {__gc = multi.m.onexit})
|
setmetatable(multi.m, {__gc = multi.m.onexit})
|
||||||
|
|||||||
@ -174,11 +174,16 @@ runTest = thread:newFunction(function()
|
|||||||
multi.error("Connection Test 3: Error removing connection")
|
multi.error("Connection Test 3: Error removing connection")
|
||||||
end
|
end
|
||||||
if not love then
|
if not love then
|
||||||
|
local ec = 0
|
||||||
multi.print("Testing pseudo threading")
|
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")
|
multi.print("Testing lanes threading")
|
||||||
os.execute("lua tests/threadtests.lua l")
|
ec = ec + os.execute("lua tests/threadtests.lua l")
|
||||||
os.exit()
|
if ec > 0 then
|
||||||
|
os.exit(1)
|
||||||
|
else
|
||||||
|
os.exit()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
@ -255,6 +255,7 @@ multi:newThread("Scheduler Thread",function()
|
|||||||
end).OnError(multi.error)
|
end).OnError(multi.error)
|
||||||
|
|
||||||
multi.OnExit(function(err_or_errorcode)
|
multi.OnExit(function(err_or_errorcode)
|
||||||
|
print("Error Code: ", err_or_errorcode)
|
||||||
if not we_good then
|
if not we_good then
|
||||||
multi.info("There was an error running some tests!")
|
multi.info("There was an error running some tests!")
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user