From af5c582431fc7e1200d63324e088fad89cbe07e2 Mon Sep 17 00:00:00 2001 From: Philip Hands Date: Fri, 4 Nov 2016 00:47:18 +0100 Subject: lvc: deal with preseed install shutting down rather quickly Signed-off-by: Holger Levsen --- cucumber/features/step_definitions/common_steps.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'cucumber') diff --git a/cucumber/features/step_definitions/common_steps.rb b/cucumber/features/step_definitions/common_steps.rb index 150c21f1..9b181796 100644 --- a/cucumber/features/step_definitions/common_steps.rb +++ b/cucumber/features/step_definitions/common_steps.rb @@ -506,8 +506,14 @@ Given /^I wait while the bulk of the packages are installed$/ do failed = false try_for(120*60, :msg => "it seems that the install stalled (timing-out after 2 hours)") do found = false + sleep(30) debug_log("debug: check for Install GRUB/Software", :color => :blue) - hit, _ = @screen.waitAny([diui_png("InstallGRUB"),diui_png("InstallGRUB-heading"),diui_png("InstallationStepFailed"),diui_png("InstallSoftware")], 2*60) + if $vm.is_running? + hit, _ = @screen.waitAny([diui_png("InstallGRUB"),diui_png("InstallGRUB-heading"),diui_png("InstallationStepFailed"),diui_png("InstallSoftware")], 10) + else + found = true + hit = '' + end debug_log("debug: found #{hit}", :color => :blue) case hit when diui_png("InstallSoftware"), diui_png("InstallationStepFailed") @@ -518,7 +524,7 @@ Given /^I wait while the bulk of the packages are installed$/ do @screen.type(Sikuli::Key.F4, Sikuli::KeyModifier.ALT) end debug_log("debug: typed F4, pausing...", :color => :blue) - sleep(10) + sleep(5) debug_log("debug: slept 10", :color => :blue) if diui_png("InstallationStepFailed") == hit failed = true -- cgit v1.2.3-70-g09d2