[Qa-jenkins-scm] [jenkins.debian.net] 03/14: lvc: step to detect VM shutdown

Holger Levsen holger at layer-acht.org
Thu Nov 3 09:32:26 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 d69e87f6c154c2daaff7491c8c3272a45a89fc1d
Author: Philip Hands <phil at hands.com>
Date:   Fri Oct 21 17:27:17 2016 +0200

    lvc: step to detect VM shutdown
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 cucumber/features/step_definitions/common_steps.rb | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/cucumber/features/step_definitions/common_steps.rb b/cucumber/features/step_definitions/common_steps.rb
index c40974f..f98dee5 100644
--- a/cucumber/features/step_definitions/common_steps.rb
+++ b/cucumber/features/step_definitions/common_steps.rb
@@ -141,6 +141,13 @@ Given /^the computer has (\d+) ([[:alpha:]]+) of RAM$/ do |size, unit|
   $vm.set_ram_size(size, unit)
 end
 
+Then /^the VM shuts down within (\d+) minutes$/ do |mins|
+  timeout = 60*mins.to_i
+  try_for(timeout, :msg => "VM is still running after #{timeout} seconds") do
+    ! $vm.is_running?
+  end
+end
+
 Given /^the computer is set to boot from the Tails DVD$/ do
   $vm.set_cdrom_boot(TAILS_ISO)
 end

-- 
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