time () returns the current timestamp, used to measure the duration of a testrun.
prepare ~base ~dir ~name is called before test suite execution. base is the parent of the log directory, dir the log directory (including unique testrun ID), and name is the test name. On Unix, this function creates the log directory dir for the test output, and sets up the symlink latest to the latest result.
with_redirect output_file f is called for each test. On Unix, it it deals with redirection of standard streams to the output_file. The implementation of with_redirect has to make sure to call f in order to run the test case.
val setup_std_outputs : ?style_renderer:Fmt.style_renderer -> ?utf_8:bool -> unit -> unitsetup_std_outputs ~style_renderer ~utf_8 () is called at startup of alcotest and sets up the standard streams for colored output.
val home_directory : unit -> (string, [ `Msg of string ]) Stdlib.resulthome_directory () is the current user's HOME directory, if it exists.