117 if not success then |
117 if not success then |
118 print("WARNING: ", "Failed to initialise tests for "..unitname, err); |
118 print("WARNING: ", "Failed to initialise tests for "..unitname, err); |
119 return; |
119 return; |
120 end |
120 end |
121 |
121 |
122 local unit = setmetatable({}, { __index = setmetatable({ module = function () end }, { __index = _G }) }); |
122 local unit = setmetatable({}, { __index = setmetatable({ module = function () _M = getfenv(2); end }, { __index = _G }) }); |
123 |
123 |
124 local fn = "../"..unitname:gsub("%.", "/")..".lua"; |
124 local fn = "../"..unitname:gsub("%.", "/")..".lua"; |
125 local chunk, err = loadfile(fn); |
125 local chunk, err = loadfile(fn); |
126 if not chunk then |
126 if not chunk then |
127 print("WARNING: ", "Failed to load module: "..unitname, err); |
127 print("WARNING: ", "Failed to load module: "..unitname, err); |