Displaying 11 results from an estimated 11 matches for "nodes_of_xpathobj".
2017 Oct 27
0
[PATCH v11 7/8] mllib: add XPath helper xpath_get_nodes
...+++ b/v2v/test-harness/v2v_test_harness.ml
@@ -25,6 +25,7 @@ open Printf
open Std_utils
open Tools_utils
+open Xpath_helpers
type test_plan = {
guest_clock : float option;
@@ -90,29 +91,18 @@ let run ~test ?input_disk ?input_xml ?(test_plan = default_plan) () =
g, root
in
- let nodes_of_xpathobj doc xpathobj =
- let nodes = ref [] in
- for i = 0 to Xml.xpathobj_nr_nodes xpathobj - 1 do
- push_front (Xml.xpathobj_node xpathobj i) nodes
- done;
- List.rev !nodes
- in
-
let test_boot boot_disk boot_xml_doc =
(* Modify boot XML (in memory). *)
let xpathctx = Xml....
2015 Mar 10
0
[PATCH] v2v: Add the test-harness used by external tests.
...n
+ let cmp (a,_) (b,_) = compare (String.length a) (String.length b) in
+ let mps = List.sort cmp mps in
+ List.iter (
+ fun (mp, dev) ->
+ try g#mount_ro dev mp
+ with G.Error msg -> eprintf "%s (ignored)\n" msg
+ ) mps;
+
+ g, root
+ in
+
+ let nodes_of_xpathobj doc xpathobj =
+ let nodes = ref [] in
+ for i = 0 to Xml.xpathobj_nr_nodes xpathobj - 1 do
+ nodes := Xml.xpathobj_node doc xpathobj i :: !nodes
+ done;
+ List.rev !nodes
+ in
+
+ let test_boot boot_disk boot_xml_doc =
+ (* Modify boot XML (in memory). *)
+ let xpathctx =...
2015 Mar 10
2
[PATCH 0/1] v2v: Add the test-harness used by external tests.
As I'm now working through the enormous virt-v2v/virt-p2v bug list, we
need a high quality set of tests to ensure that we don't accidentally
regress some old OS/hypervisor combination while making changes.
The test cases are going to be huge, so we cannot possibly distribute
them in libguestfs. Furthermore many of them have licensing problems
which means we cannot redistribute them at
2017 Oct 27
15
[PATCH v11 0/8] virt-builder-repository
Hi all,
Here is the latest version of the series.
Diffs to v10:
* Make Index.arch a (string, string option) maybe and use it
to guess arch at parse time
* Compute the image size at parse time when the template flag
is set and the value is missing.
* Add virt-repository_main slow test
* Other fixes from Richard's comments
Cédric Bosdonnat (7):
Ignore builder/*.out and *.img
2015 Jun 25
0
[PATCH v2] v2v: Free XML objects in the correct order.
...diff --git a/v2v/test-harness/v2v_test_harness.ml b/v2v/test-harness/v2v_test_harness.ml
index 9ab2de7..efbda7b 100644
--- a/v2v/test-harness/v2v_test_harness.ml
+++ b/v2v/test-harness/v2v_test_harness.ml
@@ -92,7 +92,7 @@ let run ~test ?input_disk ?input_xml ?(test_plan = default_plan) () =
let nodes_of_xpathobj doc xpathobj =
let nodes = ref [] in
for i = 0 to Xml.xpathobj_nr_nodes xpathobj - 1 do
- nodes := Xml.xpathobj_node doc xpathobj i :: !nodes
+ nodes := Xml.xpathobj_node xpathobj i :: !nodes
done;
List.rev !nodes
in
diff --git a/v2v/xml-c.c b/v2v/xml-c.c
index 2602...
2015 Jun 25
0
[PATCH] v2v: Free XML objects in the correct order.
...diff --git a/v2v/test-harness/v2v_test_harness.ml b/v2v/test-harness/v2v_test_harness.ml
index 9ab2de7..efbda7b 100644
--- a/v2v/test-harness/v2v_test_harness.ml
+++ b/v2v/test-harness/v2v_test_harness.ml
@@ -92,7 +92,7 @@ let run ~test ?input_disk ?input_xml ?(test_plan = default_plan) () =
let nodes_of_xpathobj doc xpathobj =
let nodes = ref [] in
for i = 0 to Xml.xpathobj_nr_nodes xpathobj - 1 do
- nodes := Xml.xpathobj_node doc xpathobj i :: !nodes
+ nodes := Xml.xpathobj_node xpathobj i :: !nodes
done;
List.rev !nodes
in
diff --git a/v2v/xml-c.c b/v2v/xml-c.c
index 2602...
2015 Jun 25
2
[PATCH v2] v2v: Free XML objects in the correct order.
In version 2:
- No substantial change, I just tidied up the code a bit.
- Removed one case where whitespace changes had crept in.
Rich.
2016 Jul 07
12
[PATCH v3 0/8] v2v: Move Curl wrapper to mllib and more.
v2 -> v3:
- Changes to the Curl API suggested by Pino.
2016 Jul 07
9
[PATCH v2 0/8] v2v: Move Curl wrapper to mllib and use it for virt-builder (and more).
v1 -> v2:
- Fixed the bug with precedence of if / @.
- Add some imperative list operators inspired by Perl, and use those
for constructing the Curl arguments, and more.
Rich.
2017 Oct 08
4
[PATCH 0/3] common/mlstdutils: Add Std_utils List and Option modules.
In Std_utils we already extend Char and String. These commits take it
a little further by extending List and adding a new Option submodule.
All basically simple refactoring.
Rich.
2017 Oct 08
7
[[PATCH v2 0/4] common/mlstdutils: Add Std_utils List and Option modules.
This time including the first commit ...