[Qa-jenkins-scm] [jenkins.debian.net] 03/03: lvc: more WIP, this probably should become a function and be called from several places

Holger Levsen holger at layer-acht.org
Sat May 21 17:08:25 UTC 2016


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

holger pushed a commit to branch h01ger/WIP-cucumber-live-screenshot
in repository jenkins.debian.net.

commit 517942b7af50726b0c8bdedc867a1c56edf5ab94
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sat May 21 19:07:21 2016 +0200

    lvc: more WIP, this probably should become a function and be called from several places
---
 cucumber/features/step_definitions/snapshots.rb | 16 ++++++++++++++++
 cucumber/features/support/hooks.rb              | 16 ----------------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/cucumber/features/step_definitions/snapshots.rb b/cucumber/features/step_definitions/snapshots.rb
index 1604dda..28660b9 100644
--- a/cucumber/features/step_definitions/snapshots.rb
+++ b/cucumber/features/step_definitions/snapshots.rb
@@ -203,6 +203,22 @@ def reach_checkpoint(name)
     end
     $vm.save_snapshot(name)
   end
+  # h01ger's attempt to save live screenshots
+  screen_capture = @screen.capture
+  p = screen_capture.getFilename
+  if File.exist?(p)
+    info_log("h01ger debug p = #{p}")
+    s = ENV['WORKSPACE']
+    s_path = "#{s}/screenshot.png"
+    FileUtils.mv(p, s_path)
+    info_log("h01ger debug s_path = #{s_path}")
+    convert = IO.popen(['convert',
+                      s_path, '-adaptive-resize', '128x96', "#{s}/screenshot-thumb.png",
+                      :err => ['/dev/null', 'w'],
+                     ])
+    info_log("h01ger debug ende")
+  end
+  # end h01ger
 end
 
 # For each checkpoint we generate a step to reach it.
diff --git a/cucumber/features/support/hooks.rb b/cucumber/features/support/hooks.rb
index 732de24..b3bdece 100644
--- a/cucumber/features/support/hooks.rb
+++ b/cucumber/features/support/hooks.rb
@@ -206,22 +206,6 @@ end
 # hooks added dynamically via add_after_scenario_hook() are supposed to
 # truly be last.
 After('@product') do |scenario|
-  # h01ger's attempt to save live screenshots
-  screen_capture = @screen.capture
-  p = screen_capture.getFilename
-  if File.exist?(p)
-    info_log("h01ger debug p = #{p}")
-    s = ENV['WORKSPACE']
-    s_path = "#{s}/screenshot.png"
-    FileUtils.mv(p, s_path)
-    info_log("h01ger debug s_path = #{s_path}")
-    convert = IO.popen(['convert',
-                      s_path, '-adaptive-resize', '128x96', "#{s}/screenshot-thumb.png",
-                      :err => ['/dev/null', 'w'],
-                     ])
-    info_log("h01ger debug ende")
-  end
-  # end h01ger
   if @video_capture_pid
     # We can be incredibly fast at detecting errors sometimes, so the
     # screen barely "settles" when we end up here and kill the video

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