[Qa-jenkins-scm] [jenkins.debian.net] 01/01: lvc: publish live-screenshots on each checkpoint
Holger Levsen
holger at layer-acht.org
Sat May 21 22:51:01 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 f7575bc318035651fd47500efd5265a3bea1c84d
Author: Holger Levsen <holger at layer-acht.org>
Date: Sat May 21 18:02:36 2016 +0200
lvc: publish live-screenshots on each checkpoint
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
cucumber/features/step_definitions/snapshots.rb | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/cucumber/features/step_definitions/snapshots.rb b/cucumber/features/step_definitions/snapshots.rb
index 1604dda..05b6282 100644
--- a/cucumber/features/step_definitions/snapshots.rb
+++ b/cucumber/features/step_definitions/snapshots.rb
@@ -159,11 +159,27 @@ def checkpoints
}
end
+def live_screenshot()
+ debug_log("debug: publishing live screenshot.")
+ screen_capture = @screen.capture
+ p = screen_capture.getFilename
+ if File.exist?(p)
+ s = ENV['WORKSPACE']
+ s_path = "#{s}/screenshot.png"
+ FileUtils.mv(p, s_path)
+ convert = IO.popen(['convert',
+ s_path, '-adaptive-resize', '128x96', "#{s}/screenshot-thumb.png",
+ :err => ['/dev/null', 'w'],
+ ])
+ end
+end
+
def reach_checkpoint(name)
scenario_indent = " "*4
step_indent = " "*6
step "a computer"
+ live_screenshot
if VM.snapshot_exists?(name)
$vm.restore_snapshot(name)
post_snapshot_restore_hook
@@ -203,6 +219,7 @@ def reach_checkpoint(name)
end
$vm.save_snapshot(name)
end
+ live_screenshot
end
# For each checkpoint we generate a step to reach it.
--
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