mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-05-31 23:40:51 +00:00
don't depend on which. Add CI script
This commit is contained in:
parent
aea80964f3
commit
5212fd4794
|
@ -48,9 +48,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultPackage = self.packages.${system}.lsyncd;
|
defaultPackage = self.packages.${system}.lsyncd;
|
||||||
devShell = pkgs.mkShell {
|
# devShell = pkgs.mkShell {
|
||||||
buildInputs = defaultDeps ++ buildTypes.lua5_3;
|
# buildInputs = defaultDeps ++ buildTypes.lua5_3;
|
||||||
};
|
# };
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
12
tests/ci-run.sh
Executable file
12
tests/ci-run.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
SRC=`pwd`
|
||||||
|
BUILD_FOLDER=`mktemp -d`
|
||||||
|
echo "Build folder: $BUILD_FOLDER"
|
||||||
|
cd $BUILD_FOLDER
|
||||||
|
cmake $SRC
|
||||||
|
make VERBOSE=1
|
||||||
|
make tests
|
||||||
|
rm -rf $BUILD_FOLDER
|
|
@ -3,6 +3,7 @@ posix = require( 'posix' )
|
||||||
string = require( 'string' )
|
string = require( 'string' )
|
||||||
path = require( 'pl.path' )
|
path = require( 'pl.path' )
|
||||||
stringx = require( 'pl.stringx' )
|
stringx = require( 'pl.stringx' )
|
||||||
|
local sys_stat = require "posix.sys.stat"
|
||||||
|
|
||||||
-- escape codes to colorize output on terminal
|
-- escape codes to colorize output on terminal
|
||||||
local c1='\027[47;34m'
|
local c1='\027[47;34m'
|
||||||
|
@ -97,7 +98,18 @@ function script_path()
|
||||||
-- local str = debug.getinfo(2, "S").source:sub(2)
|
-- local str = debug.getinfo(2, "S").source:sub(2)
|
||||||
-- return str:match("(.*/)")
|
-- return str:match("(.*/)")
|
||||||
return path.dirname(path.abspath(debug.getinfo(1).short_src))
|
return path.dirname(path.abspath(debug.getinfo(1).short_src))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function which(exec)
|
||||||
|
local path = os.getenv("PATH")
|
||||||
|
for match in (path..':'):gmatch("(.-)"..':') do
|
||||||
|
local fname = match..'/'..exec
|
||||||
|
local s = sys_stat.stat(fname)
|
||||||
|
if s ~= nil then
|
||||||
|
return fname
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Starts test ssh server
|
-- Starts test ssh server
|
||||||
|
@ -135,10 +147,9 @@ function startSshd()
|
||||||
PidFile ]] .. sshdPath .. [[sshd.pid
|
PidFile ]] .. sshdPath .. [[sshd.pid
|
||||||
]])
|
]])
|
||||||
f:close( )
|
f:close( )
|
||||||
local which = io.popen("which sshd")
|
--local which = io.popen("which sshd")
|
||||||
local path = which:read("a")
|
exePath = which('sshd')
|
||||||
local exePath = string.sub(path, 0, #path - 1 )
|
cwriteln("Using sshd: "..exePath)
|
||||||
-- local sshPath = which:read("a*")
|
|
||||||
|
|
||||||
local pid = spawn(exePath, "-f", sshdPath .. "sshd_config")
|
local pid = spawn(exePath, "-f", sshdPath .. "sshd_config")
|
||||||
cwriteln( 'spawned sshd server: ' .. pid)
|
cwriteln( 'spawned sshd server: ' .. pid)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user