[Qa-jenkins-scm] [jenkins.debian.net] 02/03: lvc: improve live-screenshot

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 e286896b82b218b37b0ab24d8ff1449e67a9ee71
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sat May 21 18:34:20 2016 +0200

    lvc: improve live-screenshot
---
 cucumber/features/support/hooks.rb | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/cucumber/features/support/hooks.rb b/cucumber/features/support/hooks.rb
index 94f1200..732de24 100644
--- a/cucumber/features/support/hooks.rb
+++ b/cucumber/features/support/hooks.rb
@@ -209,16 +209,18 @@ After('@product') do |scenario|
   # h01ger's attempt to save live screenshots
   screen_capture = @screen.capture
   p = screen_capture.getFilename
-  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',
+  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")
+    info_log("h01ger debug ende")
+  end
   # end h01ger
   if @video_capture_pid
     # We can be incredibly fast at detecting errors sometimes, so the

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