package tezt

  1. Overview
  2. Docs

Command-line interface.

type log_level =
  1. | Quiet
  2. | Error
  3. | Warn
  4. | Report
  5. | Info
  6. | Debug

Log levels for standard output.

The list below is sorted from the most quiet level to the most verbose level.

  • Absolutely no log has log level Quiet. In other words, setting log level Quiet inhibits all logs.
  • Error logs are about errors which imply that the current test failed. This includes messages given to Test.fail and uncaught exceptions.
  • Warn logs are about errors that do not cause the current test to fail. This includes failure to clean up temporary files, for instance.
  • Report logs are informational messages that report the result of the current test. They tell the user whether the test was successful or not. They may also include information about how to re-run the test.
  • Info logs are informational messages that summarize what the test is doing. They tell the user that a particular milestone was reached. In tests, it is a good idea to log Info messages at significant checkpoints.
  • Debug logs give more details about exactly what is happening. They include external process outputs, exit codes, and signals which are sent.

Additionally, some flags such as --commands and --list cause some information to be printed unconditionally, even with --quiet. Such kind of output is not considered to be log messages.

type temporary_file_mode =
  1. | Delete
  2. | Delete_if_successful
  3. | Keep

What to do with temporary files after the test is finished.

type loop_mode =
  1. | Infinite
  2. | Count of int

How many times to loop.

type options = {
  1. color : bool;
  2. log_level : log_level;
  3. log_file : string option;
  4. log_buffer_size : int;
  5. commands : bool;
  6. temporary_file_mode : temporary_file_mode;
  7. keep_going : bool;
  8. files_to_run : string list;
  9. tests_to_run : string list;
  10. tests_not_to_run : string list;
  11. tags_to_run : string list;
  12. tags_not_to_run : string list;
  13. list : [ `Ascii_art | `Tsv ] option;
  14. global_timeout : float option;
  15. test_timeout : float option;
  16. reset_regressions : bool;
  17. loop_mode : loop_mode;
  18. time : bool;
  19. starting_port : int;
  20. record : string option;
  21. from_records : string list;
  22. job : (int * int) option;
  23. job_count : int;
  24. suggest_jobs : bool;
  25. junit : string option;
}

Command-line options.

val options : options

Values for command-line options.