diff options
Diffstat (limited to 'xmake/actions/test/main.lua')
| -rw-r--r-- | xmake/actions/test/main.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/actions/test/main.lua b/xmake/actions/test/main.lua index 7dcf3201c..0a00b76f1 100644 --- a/xmake/actions/test/main.lua +++ b/xmake/actions/test/main.lua @@ -520,7 +520,7 @@ function get_tests() local scriptdir = target:scriptdir() target_new:name_set(target:name() .. "_" .. name) for _, file in ipairs(extra.files) do - file = path.absolute(file, scriptdir) + local file = path.absolute(file, scriptdir) file = path.relative(file, os.projectdir()) target_new:add("files", file, {defines = extra.defines, cflags = extra.cflags, @@ -531,7 +531,7 @@ function get_tests() project.target_add(target_new) end for _, file in ipairs(extra.remove_files) do - file = path.absolute(file, scriptdir) + local file = path.absolute(file, scriptdir) file = path.relative(file, os.projectdir()) target_new:remove("files", file) end @@ -586,7 +586,7 @@ function main() if test_patterns then local tests_new = {} for _, pattern in ipairs(test_patterns) do - pattern = "^" .. path.pattern(pattern) .. "$" + local pattern = "^" .. path.pattern(pattern) .. "$" for name, testinfo in pairs(tests) do if name:match(pattern) then tests_new[name] = testinfo |
