summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-06-26 18:38:23 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-06-26 18:39:05 +0100
commit0977c8408a1119c0582e3d2ab6edef23a1f1f22e (patch)
treed85795d3818b2ad45e287ff439c0fee99b78519f
parent8d88b06277c1d6d7a26b9434cc69a7bae9ada7fc (diff)
downloadlibguestfs-0977c8408a1119c0582e3d2ab6edef23a1f1f22e.tar.gz
libguestfs-0977c8408a1119c0582e3d2ab6edef23a1f1f22e.tar.xz
libguestfs-0977c8408a1119c0582e3d2ab6edef23a1f1f22e.zip
ocaml: Allow parallel mount-local test to be skipped.
FUSE is not very reliable on RHEL 5.
-rw-r--r--ocaml/t/guestfs_500_parallel_mount_local.ml13
1 files changed, 13 insertions, 0 deletions
diff --git a/ocaml/t/guestfs_500_parallel_mount_local.ml b/ocaml/t/guestfs_500_parallel_mount_local.ml
index 779afc1c..5a432f00 100644
--- a/ocaml/t/guestfs_500_parallel_mount_local.ml
+++ b/ocaml/t/guestfs_500_parallel_mount_local.ml
@@ -41,6 +41,19 @@ let clip low high v = min high (max low v)
let rec main () =
Random.self_init ();
+ (* Allow the test to be skipped by setting this environment variable.
+ * This is for RHEL 5, where FUSE doesn't work very reliably.
+ *)
+ let () =
+ let name = "SKIP_TEST_GUESTFS_500_PARALLEL_MOUNT_LOCAL_ML" in
+ let value = try Sys.getenv name with Not_found -> "" in
+ if value <> "" then (
+ printf "%s: test skipped because %s is set.\n"
+ Sys.executable_name name;
+ exit 0
+ )
+ in
+
(* Choose the number of threads based on the amount of free memory. *)
let nr_threads =
let mbytes =