summaryrefslogtreecommitdiffstats
path: root/conf.d/project/lua.d
diff options
context:
space:
mode:
Diffstat (limited to 'conf.d/project/lua.d')
-rw-r--r--conf.d/project/lua.d/aft.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/conf.d/project/lua.d/aft.lua b/conf.d/project/lua.d/aft.lua
index 62c1de7..5032929 100644
--- a/conf.d/project/lua.d/aft.lua
+++ b/conf.d/project/lua.d/aft.lua
@@ -364,8 +364,15 @@ function _launch_test(context, args)
dofile('var/'..args.files)
end
+ AFB:success(_AFT.context, { info = "Launching tests"})
lu.LuaUnit:runSuiteByInstances(_AFT.tests_list)
- AFB:success(context, {"Tests launched"})
+ local success ="Success : "..tostring(lu.LuaUnit.result.passedCount)
+ local failures="Failures : "..tostring(lu.LuaUnit.result.testCount-lu.LuaUnit.result.passedCount)
+
+ local evtHandle = AFB:evtmake(_AFT.context, 'results')
+ AFB:subscribe(_AFT.context,evtHandle)
+ AFB:evtpush(_AFT.context,evtHandle,{info = success.." "..failures})
+
if _AFT.exit[1] == 1 then os.exit(_AFT.exit[2]) end
end