catala/build_system/clerk_runtest.mli

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.5 KiB
OCaml
Raw Normal View History

(* This file is part of the Catala build system, a specification language for
tax and social benefits computation rules. Copyright (C) 2022-2023 Inria,
contributors: Louis Gesbert <louis.gesbert@inria.fr>
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License. *)
(** This module contains specific commands used to detect and run inline tests
in Catala files. The functionality is built into the `clerk runtest`
subcommand, but is separate from the normal Clerk behaviour: Clerk drives
Ninja, which in turn might need to evaluate tests as part of some rules and
can run `clerk runtest` in a reentrant way. *)
open Catala_utils
val run_tests :
catala_exe:string ->
catala_opts:string list ->
test_flags:string list ->
report:File.t option ->
out:File.t option ->
File.t ->
unit
(** [run_tests ~catala_exe ~catala_opts ~test_flags ~report ~out file] runs the
tests in Catala [file] using the given path to the Catala executable and the
provided options. Output is printed to [stdout] if [out] is [None]. *)