diff options
author | Philip Hands <phil@hands.com> | 2017-03-20 16:16:21 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2017-03-20 22:28:56 +0100 |
commit | 42746d9dec06ce92701b77d017c4c5d048fb1093 (patch) | |
tree | 302ae46207d2cc3917301c97b5a376cd7ef0b0a8 | |
parent | c7a9bfe0d40e17aa76484d5e3c83995042345661 (diff) | |
download | jenkins.debian.net-42746d9dec06ce92701b77d017c4c5d048fb1093.tar.xz |
lvc: make sure we wait long enough for the grub.cfg to be present
this adds a tweaked version of the generic image finder, to avoid
trying to mention diui_png() in the cucumber code
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rw-r--r-- | cucumber/features/install.feature | 1 | ||||
-rw-r--r-- | cucumber/features/step_definitions/common_steps.rb | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/cucumber/features/install.feature b/cucumber/features/install.feature index 93d1c332..8d291d84 100644 --- a/cucumber/features/install.feature +++ b/cucumber/features/install.feature @@ -111,6 +111,7 @@ Feature: Doing variations on d-i installs And running "grep fsck /target/etc/modprobe.d/local.conf" fails And I wait while the bulk of the packages are installed And I install GRUB + And I see the "InstallComplete" screen, after at most 240 seconds And running "grep wibble /target/boot/grub/grub.cfg" succeeds And I allow reboot after the install is complete And I wait for the reboot diff --git a/cucumber/features/step_definitions/common_steps.rb b/cucumber/features/step_definitions/common_steps.rb index 0cebc1a3..feec90e2 100644 --- a/cucumber/features/step_definitions/common_steps.rb +++ b/cucumber/features/step_definitions/common_steps.rb @@ -669,7 +669,7 @@ Given /^I install GRUB$/ do end Given /^I allow reboot after the install is complete$/ do - @screen.wait(diui_png("InstallComplete"), 4 * 60 * PATIENCE) + step('I see the "InstallComplete" screen, after at most 240 seconds') @screen.type(Sikuli::Key.ENTER) end @@ -880,6 +880,15 @@ Then /^I (do not )?see "([^"]*)" after at most (\d+) seconds$/ do |negation, ima end end +Then /^I (do not )?see the "([^"]*)" screen, after at most (\d+) seconds$/ do |negation, image, time| + begin + @screen.wait(diui_png(image), time.to_i) + raise "found '" + diui_png(image) + "' while expecting not to" if negation + rescue FindFailed => e + raise e if not(negation) + end +end + Then /^all Internet traffic has only flowed through Tor$/ do leaks = FirewallLeakCheck.new(@sniffer.pcap_file, :accepted_hosts => get_all_tor_nodes) |