search for: common_utils_tests

Displaying 20 results from an estimated 112 matches for "common_utils_tests".

2015 Jan 22
0
[PATCH 2/2] mllib: convert common_utils_tests to oUnit
Covert common_utils_tests to use oUnit as testing framework, replacing the hand-made assert in favour of structured unit tests and better error reporting. common_utils_tests is now built only when the oUnit module has been found. --- mllib/Makefile.am | 17 ++++- mllib/common_utils_tests.ml | 155 ++++++++++++++...
2015 Jan 22
3
[PATCH 1/2] configure: look for the oUnit OCaml module
It will be used for the OCaml unit tests. --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index e0fb481..e360bbb 100644 --- a/configure.ac +++ b/configure.ac @@ -1120,6 +1120,7 @@ AS_IF([test "x$OCAMLC" != "xno"],[ ]) OCAML_PKG_gettext=no +OCAML_PKG_oUnit=no AS_IF([test "x$OCAMLC" != "xno"],[ #
2015 May 13
0
[PATCH 2/2] mllib: link tests with automake
Add a dummy C source, otherwise automake tries to look for e.g. common_utils_tests.c. Also, set check_PROGRAMS properly with them. --- mllib/Makefile.am | 48 +++++++++++++++++++++++++++++++++--------------- mllib/dummy.c | 2 ++ po/POTFILES | 1 + 3 files changed, 36 insertions(+), 15 deletions(-) create mode 100644 mllib/dummy.c diff --git a/mllib/Makefile.am b/...
2015 Jan 23
2
[PATCH 1/2] mllib: tests: add tests for string_lines_split
--- mllib/common_utils_tests.ml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mllib/common_utils_tests.ml b/mllib/common_utils_tests.ml index 09d5c51..283e9a1 100644 --- a/mllib/common_utils_tests.ml +++ b/mllib/common_utils_tests.ml @@ -27,6 +27,7 @@ let prog = "common_utils_tests" let ass...
2015 May 12
4
[PATCH 1/2] mllib: remove spurious check_SCRIPTS from Makefile.am
...uild an oUnit-based unit test). --- mllib/Makefile.am | 3 --- 1 file changed, 3 deletions(-) diff --git a/mllib/Makefile.am b/mllib/Makefile.am index 0b43684..e363f27 100644 --- a/mllib/Makefile.am +++ b/mllib/Makefile.am @@ -132,9 +132,6 @@ libdir.ml: Makefile # Tests. -check_SCRIPTS = \ - common_utils_tests - if HAVE_OCAMLOPT common_utils_tests.cmx: OCAMLPACKAGES += $(OCAMLPACKAGES_TESTS) common_utils_tests: config.cmx common_gettext.cmx common_utils.cmx common_utils_tests.cmx -- 2.1.0
2015 Jan 23
0
[PATCH 2/2] mllib: add simple tests for the JSON module
...++++ mllib/Makefile.am | 15 +++- po/POTFILES-ml | 1 + 4 files changed, 260 insertions(+), 2 deletions(-) create mode 100644 mllib/JSON_tests.ml diff --git a/.gitignore b/.gitignore index 4c1b90c..441cb83 100644 --- a/.gitignore +++ b/.gitignore @@ -308,6 +308,7 @@ Makefile.in /mllib/common_utils_tests /mllib/config.ml /mllib/dummy +/mllib/JSON_tests /mllib/libdir.ml /mllib/link.sh /ocaml/bindtests.bc diff --git a/mllib/JSON_tests.ml b/mllib/JSON_tests.ml new file mode 100644 index 0000000..ea91f7d --- /dev/null +++ b/mllib/JSON_tests.ml @@ -0,0 +1,245 @@ +(* mllib + * Copyright (C) 2015 Red...
2015 May 12
0
Re: [PATCH 1/2] mllib: remove spurious check_SCRIPTS from Makefile.am
...-- > 1 file changed, 3 deletions(-) > > diff --git a/mllib/Makefile.am b/mllib/Makefile.am > index 0b43684..e363f27 100644 > --- a/mllib/Makefile.am > +++ b/mllib/Makefile.am > @@ -132,9 +132,6 @@ libdir.ml: Makefile > > # Tests. > > -check_SCRIPTS = \ > - common_utils_tests > - > if HAVE_OCAMLOPT > common_utils_tests.cmx: OCAMLPACKAGES += $(OCAMLPACKAGES_TESTS) > common_utils_tests: config.cmx common_gettext.cmx common_utils.cmx common_utils_tests.cmx > -- I don't think this is spurious (although it doesn't do very much). Automake wants us...
2016 Dec 18
0
[PATCH v4 4/6] mllib: modify nsplit to take optional noempty and count arguments
...: specifies how many splits to perform; negative count (the default) means do as many splits as possible Added tests for nsplit. Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com> --- mllib/common_utils.ml | 12 +++++++++--- mllib/common_utils.mli | 12 ++++++++++-- mllib/common_utils_tests.ml | 26 ++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 5 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index f948dce..b6f3046 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -130,15 +130,21 @@ module String = struct done; if...
2014 Dec 04
2
[PATCH v3 0/2] v2v: When picking a default kernel, favour non-debug
Since v2: - Use string_suffix kernel_name "-debug" || string_suffix kernel_name "-dbg" - This requires addition of the string_suffix function and some tests
2014 Nov 25
3
[PATCH] mllib: use Unix.isatty
Make use of Unix.isatty instead of our TTY.isatty_stdout, as the supported OCaml provides the former already. --- mllib/common_utils.ml | 10 +++++----- mllib/progress.ml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 295981c..9fcd8dd 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -207,15 +207,15
2017 Jan 30
0
[PATCH v6 2/3] mllib: modify nsplit to take optional noempty and count arguments
...specifies how many splits to perform; negative count (the default) means do as many splits as possible Added tests for nsplit. Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com> --- mllib/common_utils.ml | 13 ++++++++++--- mllib/common_utils.mli | 12 ++++++++++-- mllib/common_utils_tests.ml | 30 ++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 5 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index e9ae6a4a2..6c5df5e1c 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -130,15 +130,22 @@ module String = struct done;...
2015 May 11
3
[PATCH 1/2] mllib: Require OUnit2 for tests.
...ce there is no new release fixing this, it's easier to switch to using OUnit2 for unit tests. --- .gitignore | 2 +- README | 2 +- mllib/JSON_tests.ml | 56 ++++++++++++++++++++------------------------- mllib/Makefile.am | 2 ++ mllib/common_utils_tests.ml | 50 +++++++++++++++++----------------------- 5 files changed, 50 insertions(+), 62 deletions(-) diff --git a/.gitignore b/.gitignore index d5c6742..2a3cc81 100644 --- a/.gitignore +++ b/.gitignore @@ -312,7 +312,7 @@ Makefile.in /mllib/JSON_tests /mllib/libdir.ml /mllib/link.sh -/mllib/oUn...
2015 May 13
3
[PATCH 1/2] build: factor out the OCaml link.sh scripts
Create a single ocaml-link.sh script, which supports a -cclib parameter so it can be used instead of the per-project link.sh scripts. As result, the libraries for each OCaml application can be moved back to each Makefile.am. --- .gitignore | 7 ------- builder/Makefile.am | 14 ++++++++++++-- builder/link.sh.in | 22 ---------------------- configure.ac | 14
2014 Nov 11
1
[PATCH] use pkg-config to look up ncurses
...AML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES) OCAMLOPTFLAGS = $(OCAMLCFLAGS) OCAMLCLIBS = \ - $(LIBXML2_LIBS) $(LIBINTL) -ltinfo -lcrypt \ + $(LIBXML2_LIBS) $(LIBINTL) $(LIBCURSES_LIBS) -lcrypt \ -L../src/.libs -lutils \ -L../gnulib/lib/.libs -lgnu @@ -154,11 +154,11 @@ check_SCRIPTS = common_utils_tests if HAVE_OCAMLOPT common_utils_tests: common_gettext.cmx tty-c.o tTY.cmx common_utils.cmx common_utils_tests.cmx $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \ - mlguestfs.cmxa -linkpkg $^ -cclib -ltinfo -o $@ + mlguestfs.cmxa -linkpkg $^ -cclib $(LIBCURSES_LIBS) -o $@ else common_utils_tests: c...
2014 Nov 05
2
[PATCH] Use -ltinfo instead of -lncurses.
...S = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES) OCAMLOPTFLAGS = $(OCAMLCFLAGS) OCAMLCLIBS = \ - $(LIBXML2_LIBS) $(LIBINTL) -lncurses -lcrypt \ + $(LIBXML2_LIBS) $(LIBINTL) -ltinfo -lcrypt \ -L../src/.libs -lutils \ -L../gnulib/lib/.libs -lgnu @@ -154,11 +154,11 @@ check_SCRIPTS = common_utils_tests if HAVE_OCAMLOPT common_utils_tests: common_gettext.cmx tty-c.o tTY.cmx common_utils.cmx common_utils_tests.cmx $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \ - mlguestfs.cmxa -linkpkg $^ -cclib -lncurses -o $@ + mlguestfs.cmxa -linkpkg $^ -cclib -ltinfo -o $@ else common_utils_tests: common_ge...
2016 Dec 09
2
Re: [PATCH v3 4/6] mllib: modify nsplit to take optional noempty and count arguments
...the empty elements > > * count: specifies how many splits to perform; negative count > (the default) means do as many splits as possible > > Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com> > --- LGTM -- while you are here, what about adding tests for it in mllib/common_utils_tests.ml? Thanks, -- Pino Toscano
2017 Apr 07
1
[PATCH 1/2] mllib: add new Common_utils.run_commands
...tdout and stderr of each command. Common_utils.run_command is adapted to use it, so all the existing code using it keeps working. Add a simple unit tests for it. --- mllib/common_utils.ml | 85 +++++++++++++++++++++++++++++++++------------ mllib/common_utils.mli | 19 ++++++++++ mllib/common_utils_tests.ml | 50 ++++++++++++++++++++++++++ 3 files changed, 132 insertions(+), 22 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 73546d7..0008d3a 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -825,29 +825,70 @@ let external_command ?(echo_cmd = true) cmd...
2016 Jul 15
0
[PATCH 3/3] mllib: tests: Add tests of the new Getopt module.
...files changed, 265 insertions(+), 2 deletions(-) create mode 100644 mllib/getopt_tests.ml create mode 100755 mllib/test-getopt.sh diff --git a/.gitignore b/.gitignore index 000e984..c1ae484 100644 --- a/.gitignore +++ b/.gitignore @@ -295,6 +295,7 @@ Makefile.in /mllib/common_gettext.ml /mllib/common_utils_tests /mllib/dummy +/mllib/getopt_tests /mllib/guestfs_config.ml /mllib/JSON_tests /mllib/libdir.ml diff --git a/mllib/Makefile.am b/mllib/Makefile.am index 4f50c52..dc36f26 100644 --- a/mllib/Makefile.am +++ b/mllib/Makefile.am @@ -162,6 +162,15 @@ common_utils_tests_CPPFLAGS = \ common_utils_tests...
2014 Feb 28
2
Re: enable build for ocaml bytecode
I believe this patch has now been superseded by Hilko's commit here: https://github.com/libguestfs/libguestfs/commit/f75142c577255b30f2a8e1d27baa5fd185594197 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
2017 Jun 20
2
[PATCH v2 1/2] mllib: add new Common_utils.run_commands
..._commands, so all the existing code using it keeps working; in addition, it gets labelled parameters for stdout and stderr FDs. Add a simple unit tests for them. --- mllib/common_utils.ml | 87 ++++++++++++++++++++++++++++++++++++--------- mllib/common_utils.mli | 21 ++++++++++- mllib/common_utils_tests.ml | 70 ++++++++++++++++++++++++++++++++++++ 3 files changed, 160 insertions(+), 18 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 6a9b089..60b43a3 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -846,29 +846,82 @@ let external_command ?(echo_cmd =...