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:
@@ -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 ]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user