Module Tezt_wrapper

Wrapper around Tezt to declare test dependencies.

include module type of Tezt
module Background = Tezt_core.Background
module Base = Tezt_core.Base
module Check = Tezt_core.Check
module Cli = Tezt_core.Cli
module Diff = Tezt_core.Diff
module JSON = JSON
module Log = Tezt_core.Log
module Process : sig ... end
module Process_hooks = Tezt_core.Process_hooks
module Runner : sig ... end
module Temp : sig ... end
module Uses : sig ... end

Test dependencies.

module Test : sig ... end
module Regression : sig ... end
type error_mode =
  1. | Ignore
  2. | Warn
  3. | Fail

Error modes.

  • Ignore: do not warn, do not fail.
  • Warn: warn, but do not fail.
  • Fail: output an error and fail the test.
val error_mode_for_missing_use : error_mode Stdlib.ref

What to do if a test uses something without having it declared in its ~uses.

Recommended setting for tests that are intended to run in the CI is Fail, which is the default.

val error_mode_for_useless_use : error_mode Stdlib.ref

What to do if a test declares something in its ~uses and does not use it.

Recommended setting for tests that are intended to run in the CI is Warn, which is the default.

Using Fail is possible but:

  • if a test is non-deterministic and only sometimes uses something, one needs to make sure Uses.path is always called anyway;
  • if a test actually uses something but not through Uses.path, the wrapper will not be able to detect it, so one will have to call Uses.path just to suppress the error.
val error_mode_for_non_existing_use : error_mode Stdlib.ref

What to do if a test declares a ~uses with a path that does not exist.

Recommended setting is Fail, which is the default.