[Pkg-libvirt-commits] [libguestfs] 12/65: v2v: test-harness: Don't need to use Unix. prefix, since module is opened.

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 309f7062e8adbc9ec7240e21d00a384d789c69bf
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Mon Mar 30 13:25:37 2015 +0100

    v2v: test-harness: Don't need to use Unix. prefix, since module is opened.
---
 v2v/test-harness/v2v_test_harness.ml | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/v2v/test-harness/v2v_test_harness.ml b/v2v/test-harness/v2v_test_harness.ml
index 9286aed..3bcea62 100644
--- a/v2v/test-harness/v2v_test_harness.ml
+++ b/v2v/test-harness/v2v_test_harness.ml
@@ -202,22 +202,22 @@ let run ~test ?input_disk ?input_xml ?(test_plan = default_plan) () =
         sprintf "compare -metric MAE %s %s null: 2>&1"
           (quote screenshot1) (quote screenshot2) in
       printf "%s\n%!" cmd;
-      let chan = Unix.open_process_in cmd in
+      let chan = open_process_in cmd in
       let lines = ref [] in
       (try while true do lines := input_line chan :: !lines done
        with End_of_file -> ());
       let lines = List.rev !lines in
-      let stat = Unix.close_process_in chan in
+      let stat = close_process_in chan in
       let similarity =
         match stat with
-        | Unix.WEXITED 0 -> 0.0 (* exact match *)
-        | Unix.WEXITED 1 ->
+        | WEXITED 0 -> 0.0              (* exact match *)
+        | WEXITED 1 ->
           Scanf.sscanf (List.hd lines) "%f" (fun f -> f)
-        | Unix.WEXITED i ->
+        | WEXITED i ->
           failwithf "external command '%s' exited with error %d" cmd i
-        | Unix.WSIGNALED i ->
+        | WSIGNALED i ->
           failwithf "external command '%s' killed by signal %d" cmd i
-        | Unix.WSTOPPED i ->
+        | WSTOPPED i ->
           failwithf "external command '%s' stopped by signal %d" cmd i in
       printf "%s %s have similarity %f\n" screenshot1 screenshot2 similarity;
       similarity <= 60.0

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