[Pkg-libvirt-commits] [libguestfs] 11/65: v2v: test-harness: Send shift key to wake up screen from blank before taking screenshots.

Hilko Bengen bengen at moszumanska.debian.org
Tue Apr 21 12:10:43 UTC 2015


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

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 6f53c6c026deaf7d65d411854bd129892ba53801
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Mon Mar 30 13:25:01 2015 +0100

    v2v: test-harness: Send shift key to wake up screen from blank before taking screenshots.
---
 v2v/test-harness/v2v_test_harness.ml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/v2v/test-harness/v2v_test_harness.ml b/v2v/test-harness/v2v_test_harness.ml
index 67a49d8..9286aed 100644
--- a/v2v/test-harness/v2v_test_harness.ml
+++ b/v2v/test-harness/v2v_test_harness.ml
@@ -177,6 +177,12 @@ let run ~test ?input_disk ?input_xml ?(test_plan = default_plan) () =
     in
 
     let take_screenshot t =
+      (* Send a left shift key to wake up the screen from blanking. *)
+      let cmd = sprintf "virsh send-key %s KEY_LEFTSHIFT" (quote domname) in
+      printf "%s\n%!" cmd;
+      ignore (Sys.command cmd);
+      sleep 2;
+
       (* Use 'virsh screenshot' command because our libvirt bindings
        * don't include virDomainScreenshot, and in any case that API
        * is complicated to use.  Returns the filename.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list