Commit f692fb24 authored by Renato Figueiro Maia's avatar Renato Figueiro Maia
Browse files

Move testes do daemon para diretório separado.

[SOMA-7116][SOMA-7115]
parent e6b54b2c
test/lua_runtime
test/node_modules
test/package-lock.json
test/daemon/node_modules
test/daemon/package-lock.json
......@@ -71,9 +71,9 @@ lint:
image: repo.tecgraf.puc-rio.br:18082/node:14.15-stretch
cache:
paths:
- test/node_modules
- test/daemon/node_modules
script:
- cd test
- cd test/daemon
- npm install
- npx eslint --ext js .
......@@ -83,15 +83,15 @@ test:
cache:
paths:
- test/lua_runtime
- test/node_modules
- test/daemon/node_modules
script:
- bash install.sh --force --posix --pbs --slurm $(pwd)/test/lua_runtime
- for rockspec in *.rockspec; do
- test/lua_runtime/bin/luarocks --force remove ${rockspec%-*-*.rockspec}
- done
- cd test
- bash install.sh --force $(pwd)/test/lua_runtime
- test/lua_runtime/bin/luarocks remove sga-daemon
- cd test/daemon
- npm install
- npm run test
- cd ../..
- test/lua_runtime/bin/luarocks purge
#-------------------------
# Docker Jobs
......
......@@ -30,6 +30,7 @@ dependencies = {
"restserver-xavante == 0.2",
"lanes >= 3.10.0",
"lualogging",
"luaposix",
"serpent",
"lua-schema", -- https://raw.githubusercontent.com/hishamhm/lua-schema/features/lua-schema-scm-1.rockspec
}
......
......@@ -152,16 +152,16 @@ class SgaDaemon {
});
await events.once(sgaOutput, "open");
const luaHome = "./lua_runtime";
const luaHome = "../lua_runtime";
const luaVer = "5.2";
const luaBin = `${luaHome}/bin/lua`;
const luaLPath = `${luaHome}/share/lua/${luaVer}/?.lua;${luaHome}/share/lua/${luaVer}/?/init.lua`;
const luaCPath = `${luaHome}/lib/lua/${luaVer}/?.so`;
this.process = child_process.spawn(luaBin, ["../sgad.lua", configPath], {
this.process = child_process.spawn(luaBin, ["../../sgad.lua", configPath], {
stdio: ["ignore", sgaOutput, sgaOutput],
env: {
LUA_PATH: `./lua_custom/?.lua;../?.lua;${luaLPath}`,
LUA_PATH: `./lua_custom/?.lua;../../?.lua;${luaLPath}`,
LUA_CPATH: luaCPath,
SGA_TESTDIR: testDir,
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment