diff --git a/shadowsocks-rust.yaml b/shadowsocks-rust.yaml index d7d95863acb..59e4ea634a2 100644 --- a/shadowsocks-rust.yaml +++ b/shadowsocks-rust.yaml @@ -56,6 +56,39 @@ subpackages: mkdir -p "${{targets.subpkgdir}}"/usr/bin/ install -Dm755 "${{targets.destdir}}"/target/release/${{range.key}} "${{targets.subpkgdir}}"/usr/bin/ +test: + environment: + contents: + packages: + - shadowsocks-rust-sslocal + - shadowsocks-rust-ssmanager + - shadowsocks-rust-ssserver + - shadowsocks-rust-ssservice + - shadowsocks-rust-ssurl + pipeline: + - runs: | + ssservice --version + ssmanager --version + ssurl --version + - runs: | + for bin in sslocal ssserver; do + echo "Starting $bin" + nohup $bin > $bin.out 2> $bin.err < /dev/null & + pid=$! + sleep 3 + + if ! (cat $bin.out $bin.err | grep "listening on"); then + echo "Could not find expected 'listening on' log message in '$bin' output!" + cat $bin.out + cat $bin.err + exit 1 + fi + + echo "Stopping $bin" + kill $pid + sleep 3 + done + update: enabled: true github: