summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf.d/controller/lua.d/aft.lua17
1 files changed, 9 insertions, 8 deletions
diff --git a/conf.d/controller/lua.d/aft.lua b/conf.d/controller/lua.d/aft.lua
index 73a9c78..190c870 100644
--- a/conf.d/controller/lua.d/aft.lua
+++ b/conf.d/controller/lua.d/aft.lua
@@ -22,13 +22,6 @@ local lu = require('luaunit')
lu.LuaUnit:setOutputType('JUNIT')
lu.LuaUnit.fname = "var/jUnitResults.xml"
--- Use our own print function to redirect it to a file the standard output
-_standard_print = print
-print = function(...)
- io.write(... .. '\n')
- _standard_print(...)
-end
-
_AFT = {
exit = {0, code},
context = _ctx,
@@ -58,6 +51,15 @@ function _AFT.exitAtEnd(code)
_AFT.exit = {1, code}
end
+-- Use our own print function to redirect it to a file in the workdir of the
+-- binder instead of the standard output.
+_AFT.setOutputFile("test_results.log")
+_standard_print = print
+print = function(...)
+ io.write(... .. '\n')
+ _standard_print(...)
+end
+
--[[
Events listener and assertion functions to test correctness of received
event data.
@@ -467,7 +469,6 @@ function _launch_test(context, args)
-- Prepare the tests execution configuring the monitoring and loading
-- lua test files to execute in the Framework.
- _AFT.setOutputFile("var/test_results.log")
AFB:servsync(_AFT.context, "monitor", "set", { verbosity = "debug" })
AFB:servsync(_AFT.context, "monitor", "trace", { add = { api = args.trace, request = "vverbose", event = "push_after" }})
if args.files and type(args.files) == 'table' then