mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-10-31 18:52:29 +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;
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = defaultDeps ++ buildTypes.lua5_3;
|
||||
};
|
||||
# devShell = pkgs.mkShell {
|
||||
# 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' )
|
||||
path = require( 'pl.path' )
|
||||
stringx = require( 'pl.stringx' )
|
||||
local sys_stat = require "posix.sys.stat"
|
||||
|
||||
-- escape codes to colorize output on terminal
|
||||
local c1='\027[47;34m'
|
||||
@ -99,6 +100,17 @@ function script_path()
|
||||
return path.dirname(path.abspath(debug.getinfo(1).short_src))
|
||||
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
|
||||
--
|
||||
@ -135,10 +147,9 @@ function startSshd()
|
||||
PidFile ]] .. sshdPath .. [[sshd.pid
|
||||
]])
|
||||
f:close( )
|
||||
local which = io.popen("which sshd")
|
||||
local path = which:read("a")
|
||||
local exePath = string.sub(path, 0, #path - 1 )
|
||||
-- local sshPath = which:read("a*")
|
||||
--local which = io.popen("which sshd")
|
||||
exePath = which('sshd')
|
||||
cwriteln("Using sshd: "..exePath)
|
||||
|
||||
local pid = spawn(exePath, "-f", sshdPath .. "sshd_config")
|
||||
cwriteln( 'spawned sshd server: ' .. pid)
|
||||
|
Loading…
Reference in New Issue
Block a user