[Qa-jenkins-scm] [jenkins.debian.net] 04/11: lvc: this is needed for the miniiso's early networking

Holger Levsen holger at layer-acht.org
Thu Jun 16 20:33:50 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 7217bdb26c9a3f67bfe17a8890f5fdf397057f18
Author: Philip Hands <phil at hands.com>
Date:   Tue Jun 14 10:32:01 2016 +0200

    lvc: this is needed for the miniiso's early networking
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 cucumber/features/step_definitions/common_steps.rb | 53 +++++++++++++---------
 1 file changed, 32 insertions(+), 21 deletions(-)

diff --git a/cucumber/features/step_definitions/common_steps.rb b/cucumber/features/step_definitions/common_steps.rb
index 26951bc..e544cf8 100644
--- a/cucumber/features/step_definitions/common_steps.rb
+++ b/cucumber/features/step_definitions/common_steps.rb
@@ -312,8 +312,13 @@ end
 
 Given /^I set the root password to "([^"]*)"$/ do |rootpw|
 # Root Password, twice
-  on_screen, _ = @screen.waitAny([diui_png("ShowRootPassword"),diui_png("RootPassword")], 30 * PATIENCE)
-  on_screen, _ = @screen.waitAny([diui_png("ShowRootPassword"),diui_png("RootPassword")], 30 * PATIENCE)
+  on_screen, _ = @screen.waitAny([diui_png("ShowRootPassword"),diui_png("RootPassword"),diui_png("MirrorCountry")], 30 * PATIENCE)
+  on_screen, _ = @screen.waitAny([diui_png("ShowRootPassword"),diui_png("RootPassword"),diui_png("MirrorCountry")], 30 * PATIENCE)
+  if diui_png("MirrorCountry") == on_screen
+    step("I accept the default mirror")
+    on_screen, _ = @screen.waitAny([diui_png("ShowRootPassword"),diui_png("RootPassword")], 30 * PATIENCE)
+    on_screen, _ = @screen.waitAny([diui_png("ShowRootPassword"),diui_png("RootPassword")], 30 * PATIENCE)
+  end
   @screen.type(rootpw)
   if "gui" == @ui_mode
     @screen.type(Sikuli::Key.TAB)
@@ -372,13 +377,18 @@ Given /^I note that the Base system is being installed$/ do
 end
 
 Given /^I accept the default mirror$/ do
-  @screen.wait(diui_png("MirrorCountry"), 10 * 60 * PATIENCE)
-  @screen.type(Sikuli::Key.ENTER)
-  @screen.wait(diui_png("ArchiveMirror"), 5 * PATIENCE)
-  @screen.type(Sikuli::Key.ENTER)
-  @screen.wait(diui_png("HttpProxy"), 5 * PATIENCE)
-  @screen.type("http://local-http-proxy:3128/" + Sikuli::Key.ENTER)
-  #@screen.type(Sikuli::Key.ENTER)
+  on_screen, _ = @screen.waitAny([diui_png("popcon"),diui_png("BadMirror"),diui_png("MirrorCountry")], 5 * 60 * PATIENCE)
+  if diui_png("MirrorCountry") == on_screen
+    @screen.wait(diui_png("MirrorCountry"), 10 * 60 * PATIENCE)
+    @screen.type(Sikuli::Key.ENTER)
+    @screen.wait(diui_png("ArchiveMirror"), 5 * PATIENCE)
+    @screen.type(Sikuli::Key.ENTER)
+    @screen.wait(diui_png("HttpProxy"), 5 * PATIENCE)
+    @screen.type("http://local-http-proxy:3128/" + Sikuli::Key.ENTER)
+    #@screen.type(Sikuli::Key.ENTER)
+  else
+    step("I ignore Popcon")
+  end
 end
 
 Given /^I neglect to scan more CDs$/ do
@@ -396,19 +406,20 @@ Given /^I neglect to scan more CDs$/ do
 end
 
 Given /^I ignore Popcon$/ do
-  bad_mirror = diui_png("BadMirror")
-  on_screen, _ = @screen.waitAny([diui_png("popcon"), bad_mirror], 10 * 60)
-  if on_screen == bad_mirror
-    if "gui" == @ui_mode
-      @screen.type(Sikuli::Key.F4) # for this to work, we need to remap the keyboard -- CtrlAltF4 is apparently untypable :-(
-    else
-      @screen.type(Sikuli::Key.F4, Sikuli::KeyModifier.ALT)
+  on_screen, _ = @screen.waitAny([diui_png("popcon"),diui_png("BadMirror"),diui_png("ChooseSoftware")], 10 * 60)
+  if diui_png("ChooseSoftware") != on_screen
+    if on_screen == diui_png("BadMirror")
+      if "gui" == @ui_mode
+        @screen.type(Sikuli::Key.F4) # for this to work, we need to remap the keyboard -- CtrlAltF4 is apparently untypable :-(
+      else
+        @screen.type(Sikuli::Key.F4, Sikuli::KeyModifier.ALT)
+      end
+      sleep(10)
+      raise "Failed to access the mirror (perhaps a duff proxy?)"
     end
-    sleep(10)
-    raise "Failed to access the mirror (perhaps a duff proxy?)"
+    @screen.type(Sikuli::Key.ENTER)
+    @screen.waitVanish(diui_png("popcon"), 10 * PATIENCE)
   end
-  @screen.type(Sikuli::Key.ENTER)
-  @screen.waitVanish(diui_png("popcon"), 10 * PATIENCE)
 end
 
 Given /^we reach the Tasksel prompt$/ do
@@ -537,7 +548,7 @@ Given /^I allow reboot after the install is complete$/ do
 end
 
 Given /^I wait for the reboot$/ do
-  @screen.waitAny(["d-i_boot_graphical-default.png","d-i_boot_text-default.png"], 10 * 60 * PATIENCE)
+  @screen.waitAny(["d-i_boot_graphical-default.png","d-i_boot_text-default.png","d-i_boot_miniiso.png"], 10 * 60 * PATIENCE)
 end
 
 Given /^I should see a ([a-zA-Z]*) Login prompt$/ do |style|

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list