From fcb49fe8d3442b5299227279185f143da3e67b69 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Fri, 3 Aug 2018 16:49:16 +0200 Subject: Search in the binding root dir for lua materials Change-Id: I09f174c99488ff104aaa7995e1575a5e5aa3a0c0 Signed-off-by: Romain Forlot --- conf.d/controller/lua.d/aft.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'conf.d') diff --git a/conf.d/controller/lua.d/aft.lua b/conf.d/controller/lua.d/aft.lua index 2c88c61..900f3ca 100644 --- a/conf.d/controller/lua.d/aft.lua +++ b/conf.d/controller/lua.d/aft.lua @@ -580,6 +580,8 @@ end function _launch_test(context, args) _AFT.context = context + local bindingRootDir = AFB:getrootdir() + local loadedfile = nil -- Prepare the tests execution configuring the monitoring and loading -- lua test files to execute in the Framework. @@ -593,12 +595,15 @@ function _launch_test(context, args) end end end + if args.files and type(args.files) == 'table' then for _,f in pairs(args.files) do - dofile('var/'..f) + local cmdHandle = io.popen('find '..bindingRootDir..'-name '..f) + loadedfile = dofile(cmdHandle:read()) end elseif type(args.files) == 'string' then - dofile('var/'..args.files) + local cmdHandle = io.popen('find '..bindingRootDir..'-name '..args.files) + loadedfile = dofile(cmdHandle:read()) end -- Execute the test within a context if given. We assume that the before -- cgit 1.2.3-korg