summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-12-23 17:59:32 +0100
committerHolger Levsen <holger@layer-acht.org>2014-12-23 17:59:32 +0100
commitd4920d6463feea2e0b9e476989103ba53981c1e0 (patch)
tree5d93788da2c965b5388bb919d96e10ab583c5776
parenteceb94b3949c6be8681d088c03b6985b64e0e446 (diff)
downloadjenkins.debian.net-d4920d6463feea2e0b9e476989103ba53981c1e0.tar.xz
lvc: enable live screenshots
-rw-r--r--features/support/hooks.rb6
-rw-r--r--job-cfg/lvc.yaml.py2
2 files changed, 8 insertions, 0 deletions
diff --git a/features/support/hooks.rb b/features/support/hooks.rb
index 2f2f98c1..d9dc03a7 100644
--- a/features/support/hooks.rb
+++ b/features/support/hooks.rb
@@ -106,7 +106,10 @@ After('@product') do |scenario|
base = File.basename(scenario.feature.file, ".feature").to_s
tmp = @screen.capture.getFilename
out = "#{$tmp_dir}/#{base}-#{DateTime.now}.png"
+ jenkins_live_screenshot = "#{$tmp_dir}/screenshot.png"
+ jenkins_live_thumb = "#{$tmp_dir}/screenshot-thumb.png"
FileUtils.mv(tmp, out)
+ FileUtils.cp(out, jenkins_live_screenshot)
STDERR.puts("Took screenshot \"#{out}\"")
if $pause_on_fail
STDERR.puts ""
@@ -114,6 +117,9 @@ After('@product') do |scenario|
STDIN.gets
end
end
+ unless system("convert #{jenkins_live_screenshot} -adaptive-resize 128x96 #{jenkins_live_thumb}")
+ raise StandardError.new("convert command exited with #{$?}")
+ end
if @sniffer
@sniffer.stop
@sniffer.clear
diff --git a/job-cfg/lvc.yaml.py b/job-cfg/lvc.yaml.py
index ec4809f6..7ef7fa37 100644
--- a/job-cfg/lvc.yaml.py
+++ b/job-cfg/lvc.yaml.py
@@ -57,6 +57,8 @@ print("""
title: '{my_title}'
includes: '{my_pngs}'
image-width: 300
+ wrappers:
+ - live-screenshot
builders:
- shell: '/srv/jenkins/bin/lvc/run_test_suite {my_params}'
triggers: