X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=tests%2Fbasic;h=5ba7a250b948affc504378ee09f2dce4ba79d76f;hb=848f2e10f0ec24c8cbc12277948159312b4b71c2;hp=c38a74b96c67c72684ca05aaa5ab59fd2b17f321;hpb=b726156758ba94070b9c2b0e92eb019faa1c0c3a;p=monkeysphere.git diff --git a/tests/basic b/tests/basic index c38a74b..5ba7a25 100755 --- a/tests/basic +++ b/tests/basic @@ -54,6 +54,7 @@ ssh_test() { # kill the sshd process if it's still running kill "$SSHD_PID" + SSHD_PID= set -e @@ -87,9 +88,16 @@ cleanup() { echo "### removing temp dir..." rm -rf "$TEMPDIR" + if [ "$SSHD_PID" ] ; then + echo "### killing off lingering sshd..." + kill "$SSHD_PID" + fi + wait } +SSHD_PID= + ## setup trap trap failed_cleanup EXIT