diff options
author | Philip Hands <phil@hands.com> | 2016-06-05 10:17:19 +0200 |
---|---|---|
committer | Philip Hands <phil@hands.com> | 2016-06-05 11:05:38 +0200 |
commit | 9c743952dd41675b22ba6332e8b84eda595c3563 (patch) | |
tree | acff29a1858d09be40ec208ea6c6a1c630ee4c7d | |
parent | 8fb2a6c5e7e3181cfddf8e37e046fc7f150fcbc3 (diff) | |
download | jenkins.debian.net-9c743952dd41675b22ba6332e8b84eda595c3563.tar.xz |
lvc: deal with InstallationStepFailed: AltF4, pause, fail
-rw-r--r-- | cucumber/features/images/d-i_text_Desktop+KDE.png | bin | 0 -> 5509 bytes | |||
-rw-r--r-- | cucumber/features/images/d-i_text_InstallationStepFailed.png | bin | 0 -> 3037 bytes | |||
-rw-r--r-- | cucumber/features/step_definitions/common_steps.rb | 30 |
3 files changed, 18 insertions, 12 deletions
diff --git a/cucumber/features/images/d-i_text_Desktop+KDE.png b/cucumber/features/images/d-i_text_Desktop+KDE.png Binary files differnew file mode 100644 index 00000000..3a87b2f8 --- /dev/null +++ b/cucumber/features/images/d-i_text_Desktop+KDE.png diff --git a/cucumber/features/images/d-i_text_InstallationStepFailed.png b/cucumber/features/images/d-i_text_InstallationStepFailed.png Binary files differnew file mode 100644 index 00000000..cfa233a3 --- /dev/null +++ b/cucumber/features/images/d-i_text_InstallationStepFailed.png diff --git a/cucumber/features/step_definitions/common_steps.rb b/cucumber/features/step_definitions/common_steps.rb index ea6d447e..786c5fac 100644 --- a/cucumber/features/step_definitions/common_steps.rb +++ b/cucumber/features/step_definitions/common_steps.rb @@ -471,12 +471,15 @@ end Given /^I wait while the bulk of the packages are installed$/ do @screen.wait(diui_png("InstallSoftware"), 10) debug_log("debug: we see InstallSoftware", :color => :blue) + failed = false try_for(120*60, :msg => "it seems that the install stalled (timing-out after 2 hours)") do found = false debug_log("debug: check for Install GRUB/Software", :color => :blue) - hit, _ = @screen.waitAny([diui_png("InstallGRUB"),diui_png("InstallSoftware")], 2*60) - if diui_png("InstallSoftware") == hit - debug_log("debug: 'Install Software' still there, so let's glance at tty4", :color => :blue) + hit, _ = @screen.waitAny([diui_png("InstallGRUB"),diui_png("InstallationStepFailed"),diui_png("InstallSoftware")], 2*60) + debug_log("debug: found #{hit}", :color => :blue) + case hit + when diui_png("InstallSoftware"), diui_png("InstallationStepFailed") + debug_log("debug: so let's glance at tty4", :color => :blue) if "gui" == @ui_mode @screen.type(Sikuli::Key.F4) # for this to work, we need to remap the keyboard -- CtrlAltF4 is apparently untypable :-( else @@ -485,21 +488,24 @@ Given /^I wait while the bulk of the packages are installed$/ do debug_log("debug: typed F4, pausing...", :color => :blue) sleep(10) debug_log("debug: slept 10", :color => :blue) - if "gui" == @ui_mode - @screen.type(Sikuli::Key.F5, Sikuli::KeyModifier.ALT) + if diui_png("InstallationStepFailed") == hit + failed = true else - @screen.type(Sikuli::Key.F1, Sikuli::KeyModifier.ALT) + if "gui" == @ui_mode + @screen.type(Sikuli::Key.F5, Sikuli::KeyModifier.ALT) + else + @screen.type(Sikuli::Key.F1, Sikuli::KeyModifier.ALT) + end + debug_log("debug: pressed F1", :color => :blue) + sleep(20) end - debug_log("debug: pressed F1", :color => :blue) - sleep(20) - end - if diui_png("InstallGRUB") == hit - debug_log("debug: found InstallGRUB", :color => :blue) + when diui_png("InstallGRUB") found = true end - found + found || failed end + raise "an Instalation Step Failed -- see the screenshot (may need to be in text-mode)" if failed end Given /^I install GRUB$/ do |