summaryrefslogtreecommitdiffstats
path: root/ocaml
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-08-02 23:29:43 +0100
committerRichard Jones <rjones@redhat.com>2010-08-17 14:09:26 +0100
commitad373a4d6c2367b78b0dd337c1797f889a94b713 (patch)
treefce2dacfebc42a822caf6741012748114998380a /ocaml
parent4440e22f4f7ebffe0728a8c019319d1a2b260cf5 (diff)
downloadlibguestfs-ad373a4d6c2367b78b0dd337c1797f889a94b713.tar.gz
libguestfs-ad373a4d6c2367b78b0dd337c1797f889a94b713.tar.xz
libguestfs-ad373a4d6c2367b78b0dd337c1797f889a94b713.zip
Remove old ocaml-inspector code.
Not used by anyone, didn't work well, and replaced now by the C inspection APIs.
Diffstat (limited to 'ocaml')
-rw-r--r--ocaml/Makefile.am13
-rw-r--r--ocaml/t/guestfs_500_inspect.ml42
2 files changed, 3 insertions, 52 deletions
diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
index 99bb390f..5c7b9295 100644
--- a/ocaml/Makefile.am
+++ b/ocaml/Makefile.am
@@ -20,15 +20,12 @@ include $(top_srcdir)/subdir-rules.mk
generator_built = \
guestfs.mli \
guestfs.ml \
- guestfs_inspector.mli \
- guestfs_inspector.ml \
guestfs_c_actions.c \
bindtests.ml
EXTRA_DIST = \
$(generator_built) \
guestfs_c.c guestfs_c.h \
- guestfs_inspector.mli guestfs_inspector.ml \
.depend META.in \
run-bindtests \
t/*.ml
@@ -45,7 +42,7 @@ if HAVE_XML_LIGHT
noinst_DATA = mlguestfs.cma mlguestfs.cmxa META
-OBJS = guestfs_c.o guestfs_c_actions.o guestfs.cmo guestfs_inspector.cmo
+OBJS = guestfs_c.o guestfs_c_actions.o guestfs.cmo
XOBJS = $(OBJS:.cmo=.cmx)
mlguestfs.cma: $(OBJS)
@@ -67,10 +64,10 @@ TESTS_ENVIRONMENT = \
TESTS = run-bindtests \
t/guestfs_005_load t/guestfs_010_launch t/guestfs_050_lvcreate \
- t/guestfs_060_readdir t/guestfs_070_threads t/guestfs_500_inspect
+ t/guestfs_060_readdir t/guestfs_070_threads
noinst_DATA += bindtests \
t/guestfs_005_load t/guestfs_010_launch t/guestfs_050_lvcreate \
- t/guestfs_060_readdir t/guestfs_070_threads t/guestfs_500_inspect
+ t/guestfs_060_readdir t/guestfs_070_threads
bindtests: bindtests.cmx mlguestfs.cmxa
mkdir -p t
@@ -96,10 +93,6 @@ t/guestfs_070_threads: t/guestfs_070_threads.cmx mlguestfs.cmxa
mkdir -p t
$(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package unix,threads -thread -linkpkg mlguestfs.cmxa $< -o $@
-t/guestfs_500_inspect: t/guestfs_500_inspect.cmx mlguestfs.cmxa
- mkdir -p t
- $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package xml-light,unix -linkpkg mlguestfs.cmxa $< -o $@
-
# Need to rebuild the tests from source if the main library has
# changed at all, otherwise we get inconsistent assumptions.
t/guestfs_070_threads.cmx: t/guestfs_070_threads.ml mlguestfs.cmxa
diff --git a/ocaml/t/guestfs_500_inspect.ml b/ocaml/t/guestfs_500_inspect.ml
deleted file mode 100644
index ec1071a9..00000000
--- a/ocaml/t/guestfs_500_inspect.ml
+++ /dev/null
@@ -1,42 +0,0 @@
-(* libguestfs OCaml bindings
- * Copyright (C) 2009 Red Hat Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *)
-
-open Unix
-
-let (//) = Filename.concat
-let dotdot = Filename.parent_dir_name
-
-let read_file name =
- let chan = open_in name in
- let lines = ref [] in
- let lines =
- try while true do lines := input_line chan :: !lines done; []
- with End_of_file -> List.rev !lines in
- close_in chan;
- String.concat "" lines
-
-let parse name =
- let xml = read_file name in
- let os = Guestfs_inspector.inspect ~xml [] in
- os
-
-let () =
- ignore (parse (dotdot // "inspector" // "example1.xml"));
- ignore (parse (dotdot // "inspector" // "example2.xml"));
- ignore (parse (dotdot // "inspector" // "example3.xml"));
- ignore (parse (dotdot // "inspector" // "example4.xml"))