Show progress while the smoketest waits on a VM

The waits for SSH, GNOME and a reboot say what they're waiting for and
repeat it once a minute, and the base build says when it's waiting for
cloud-init, installing GNOME and shutting down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 07:28:10 -07:00
co-authored by Claude Opus 5.5
parent e4c68a5567
commit e003b4c352
3 changed files with 42 additions and 0 deletions
+11
View File
@@ -170,3 +170,14 @@ last_run() {
[[ "$output" == *"base built"* ]]
[[ "$output" == *"installed not built"* ]]
}
@test "long waits say what they're waiting for, then again once a minute" {
run bash -c 'source "$1"; wait_begin "waiting for X"; wait_tick
SECONDS=61; wait_tick; wait_tick; SECONDS=125; wait_tick; wait_done' _ "$PROJECT/lib/vm.sh"
[ "$status" -eq 0 ]
[ "${lines[0]}" = "waiting for X..." ]
[ "${lines[1]}" = " still waiting for X (1 min)" ]
[ "${lines[2]}" = " still waiting for X (2 min)" ]
[[ "${lines[3]}" == " done after "*s ]]
[ "${#lines[@]}" -eq 4 ]
}