summaryrefslogtreecommitdiff
path: root/tests/basic
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-28 18:04:51 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-28 18:04:51 -0400
commit3e5ccfd11d143e113944a8c35831618421d90552 (patch)
treeb610ce6d746a78244fe37f75d2074ceca136dc19 /tests/basic
parentd080f8c802e0ca929577abe70118fa765d473dc6 (diff)
do not choke at end of test suite if no sshd was ever launched.
Diffstat (limited to 'tests/basic')
-rwxr-xr-xtests/basic3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/basic b/tests/basic
index 3ec4a21..393bcc2 100755
--- a/tests/basic
+++ b/tests/basic
@@ -43,7 +43,7 @@ failed_cleanup() {
}
cleanup() {
- if ( ps "$SSHD_PID" >/dev/null ) ; then
+ if [ "$SSHD_PID" ] && ( ps "$SSHD_PID" >/dev/null ) ; then
echo "### stopping still-running sshd..."
kill "$SSHD_PID"
fi
@@ -82,6 +82,7 @@ export MONKEYSPHERE_CHECK_KEYSERVER=false
export SSHD_CONFIG="$TEMPDIR"/sshd_config
export SOCKET="$TEMPDIR"/ssh-socket
+export SSHD_PID=
# copy in admin and testuser home to tmp
echo "### copying admin and testuser homes..."