2017-07-21 07:43:36 -07:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* OCaml *)
|
|
|
|
(* *)
|
|
|
|
(* Sebastien Hinderer, projet Gallium, INRIA Paris *)
|
|
|
|
(* *)
|
|
|
|
(* Copyright 2016 Institut National de Recherche en Informatique et *)
|
|
|
|
(* en Automatique. *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. This file is distributed under the terms of *)
|
|
|
|
(* the GNU Lesser General Public License version 2.1, with the *)
|
|
|
|
(* special exception on linking described in the file LICENSE. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
|
|
|
(* File comparison tools *)
|
|
|
|
|
|
|
|
type result =
|
|
|
|
| Same
|
|
|
|
| Different
|
|
|
|
| Unexpected_output
|
|
|
|
| Error of string * int
|
|
|
|
|
2017-09-15 04:28:59 -07:00
|
|
|
type tool
|
2017-07-21 07:43:36 -07:00
|
|
|
|
2018-03-05 02:09:57 -08:00
|
|
|
type ignore = {bytes: int; lines: int}
|
|
|
|
val make_cmp_tool : ignore:ignore -> tool
|
2017-07-21 07:43:36 -07:00
|
|
|
|
2017-09-15 04:28:59 -07:00
|
|
|
val make_comparison_tool :
|
|
|
|
?result_of_exitcode:(string -> int -> result) -> string -> string -> tool
|
|
|
|
|
2017-07-21 07:43:36 -07:00
|
|
|
val default_comparison_tool : tool
|
|
|
|
|
|
|
|
type filetype = Binary | Text
|
|
|
|
|
|
|
|
type files = {
|
|
|
|
filetype : filetype;
|
|
|
|
reference_filename : string;
|
|
|
|
output_filename : string;
|
|
|
|
}
|
|
|
|
|
|
|
|
val compare_files : ?tool:tool -> files -> result
|
|
|
|
|
|
|
|
val check_file : ?tool:tool -> files -> result
|
|
|
|
|
|
|
|
val cmp_result_of_exitcode : string -> int -> result
|
|
|
|
|
2018-08-27 04:42:14 -07:00
|
|
|
val diff : files -> (string, string) Stdlib.result
|
2019-09-03 00:50:06 -07:00
|
|
|
|
|
|
|
val promote : files -> ignore -> unit
|