summaryrefslogtreecommitdiff
path: root/tests/test_common.sh
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2023-01-03 12:04:00 +0100
committerHelmut Grohne <helmut@subdivi.de>2023-01-03 12:11:25 +0100
commit130f3bbf71a9ce28925dd27c05b6887870fb3a0f (patch)
tree474d67664956f79e3f72ec1b57bd0b898ca457b8 /tests/test_common.sh
parent84cc5e4258ce543e72d082565e167cf71a25f5cc (diff)
downloaddebvm-130f3bbf71a9ce28925dd27c05b6887870fb3a0f.tar.gz
add a debvm-waitssh utility
Diffstat (limited to 'tests/test_common.sh')
-rw-r--r--tests/test_common.sh11
1 files changed, 0 insertions, 11 deletions
diff --git a/tests/test_common.sh b/tests/test_common.sh
index f42a26a..cba9693 100644
--- a/tests/test_common.sh
+++ b/tests/test_common.sh
@@ -5,14 +5,3 @@ run_ssh() {
test -n "${SSH_PORT:-}" && set -- -p "$SSH_PORT" "$@"
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -l root "$@"
}
-
-wait_ssh() {
- wait_ssh_timeout=5
- wait_ssh_ts=$(sleepenh 0 || [ $? -eq 1 ])
- for _ in $(seq 30); do
- run_ssh -o ConnectTimeout="$wait_ssh_timeout" "$@" echo success && return 0
- wait_ssh_ts=$(sleepenh "$wait_ssh_ts" "$wait_ssh_timeout" || [ $? -eq 1 ])
- done
- echo "timeout reached" >&2
- return 1
-}