summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/create-and-run.sh2
-rwxr-xr-xtests/dist-upgrades.sh4
-rw-r--r--tests/test_common.sh11
3 files changed, 3 insertions, 14 deletions
diff --git a/tests/create-and-run.sh b/tests/create-and-run.sh
index 540e6c4..4ec07eb 100755
--- a/tests/create-and-run.sh
+++ b/tests/create-and-run.sh
@@ -26,6 +26,6 @@ SSH_PORT=2222
timeout 240s debvm-run -s "$SSH_PORT" -i "$IMAGE" &
set -- localhost
test "$RELEASE" = jessie && set -- -o PubkeyAcceptedKeyTypes=+ssh-rsa "$@"
-wait_ssh "$@"
+debvm-waitssh "$SSH_PORT"
run_ssh "$@" poweroff
wait
diff --git a/tests/dist-upgrades.sh b/tests/dist-upgrades.sh
index 85c9f4a..3bab4ab 100755
--- a/tests/dist-upgrades.sh
+++ b/tests/dist-upgrades.sh
@@ -44,12 +44,12 @@ for RELEASE in stretch buster bullseye bookworm sid; do
timeout 15m debvm-run -s "$SSH_PORT" &
set -- localhost
test "$RELEASE" = stretch && set -- -o PubkeyAcceptedKeyTypes=+ssh-rsa "$@"
- wait_ssh "$@"
+ debvm-waitssh "$SSH_PORT"
run_ssh "$@" "upgrade $RELEASE"
wait
done
timeout 5m debvm-run -s "$SSH_PORT" &
-wait_ssh localhost
+debvm-waitssh "$SSH_PORT"
run_ssh localhost poweroff
wait
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
-}