Skip to content
Snippets Groups Projects
Commit a455c830 authored by 最萌小汐's avatar 最萌小汐
Browse files

编译后跑一遍单元测试

parent 4eadbf38
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,14 @@ lm:build 'install' {
}
}
lm:build 'unittest' {
'$luamake', 'lua', 'make/unittest.lua', lm.plat,
deps = {
'install',
}
}
lm:default {
'install'
'install',
'unittest',
}
local platform = ...
local fs = require 'bee.filesystem'
local sp = require 'bee.subprocess'
local exe = platform == 'msvc' and ".exe" or ""
local CWD = fs.current_path()
local process = assert(sp.spawn {
CWD / 'server' / 'bin' / ('lua-language-server' .. exe),
CWD / 'server' / 'test.lua',
'-E',
stdout = true,
stderr = true,
})
for line in process.stdout:lines 'l' do
print(line)
end
process:wait()
local err = process.stderr:read 'a'
if err ~= '' then
error(err)
end
......@@ -21,6 +21,7 @@ local function runTest(root)
exe,
test,
'-E',
cwd = root,
stdout = true,
stderr = true,
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment