package tezt
Install
Dune Dependency
Authors
Maintainers
Sources
md5=362773eb411d8a62fd3c6ec25c5a1f0e
sha512=c56c705b28f4399223576563f4ca0168c818adc57d9f0710cd1eaa5185fc26cf321de5f6f3ede7125ce5f5922c5e0456d3044c23acc6fa12b466fe23ca9d48a7
CHANGES.md.html
Changelog
Development Version
Breaking Changes
New Features
Bug Fixes
Version 3.0.0
Breaking Changes
Argument
~output_file
ofRegression.register
is now optional and has been renamed into?file
. Previously,~output_file
was automatically prefixed by the value given to--regression-dir
. Now, files are put in a directory namedexpected
next to the test itself, and the default filename is a sanitized version of the test title.Removed the
--regression-dir
command-line parameter.
New Features
The
tezt
Dune library was split intotezt.core
andtezt
. Librarytezt.core
contains the parts that can run both on UNIX and using Node.js. It does not containTest.run
though so it cannot be used on its own. Librarytezt
is the UNIX backend. It also includestezt.core
, so this is not a breaking change.New library
tezt.js
is a partial backend for Node.js. Compared totezt
, it does not contain modulesProcess
,Temp
andRunner
.Added
--resume
(short-hand:-r
) and--resume-file
, which allow to resume a previous run. For instance, if the previous run stopped after a failed test, and if that previous run was itself ran with--resume
or--resume-file
, resume from this run to avoid running the tests that already succeeded again.Added
--match
(short-hand:-m
) to select tests with a title that match a regular expression.Added a
?timeout
argument toProcess.terminate
andProcess.clean_up
. These functions sendSIGTERM
to processes. If this timeout is reached without the process actually terminating,Process.terminate
also sendsSIGKILL
.Added module
Diff
which allows to compare two sequences. It is used internally by theRegression
module to compare test outputs between runs.Added module
Main
with functionMain.run
, which is the same asTest.run
. In practice you can still useTest.run
, which now delegates toMain.run
. ButTest.run
is not available intezt.core
, only intezt
andtezt.js
. This is not a breaking change since existing applications would usetezt
, nottezt.core
directly.Added
Base.project_root
which is the path to the root of the current dune project according to environment variableDUNE_SOURCEROOT
, falling back to the current directory if unavailable.Added
Base.span
to split a list in two sublists given a predicate.Added
Base.rexf
, a short-hand forrex @@ sf
.Added
Check.file_exists
,Check.file_not_exists
,Check.directory_exists
andCheck.directory_not_exists
.Added
Check.is_true
andCheck.is_false
.Added
Check.json
andCheck.json_u
, type definitions forJSON.t
andJSON.u
respectively.Added support for
int32
in theJSON
module.Added
JSON.merge_objects
,JSON.filter_map_object
andJSON.filter_object
.Added
JSON.equal
andJSON.equal_u
, equality predicates onJSON.t
andJSON.u
respectively.Added
Temp.set_pid
. TheTemp
module no longer callsUnix.getpid
directly, this is done byTest.run
instead, which callsTemp.set_pid
. This allows backends whereUnix.getpid
cannot be used, like JS.Added
Test.run_with_scheduler
, and theTest.SCHEDULER
signature. AddedTest.get_test_by_title
andTest.run_one
. Those functions are used internally to provide different backends (UNIX / JS), but users usually would not have any use for them.Some fields in records obtained with
--record
became optional, with default values. New records may not be compatible with old versions of Tezt.Added module
Process_hooks
which contains the type definition forProcess.hooks
.
Bug Fixes
Fixed some cases where regression tests would crash instead of failing gracefully for some system errors.
Temp.clean_up
no longer follows symbolic links, it just deletes the links themselves.Fixed
--junit
which no longer worked when using-j
.Fixed
--loop-count 0
which did not actually run zero loops.Fixed a bug where Tezt would exit prematurely without running tests when using
--on-unknown-regression-files delete
or--on-unknown-regression-files fail
.Fixed a redundancy in the warning message when removing a non-empty temporary directories registered with the
Temp
module.Fixed some whitespace issues in
--help
.
Older Versions
Tezt 2.0.0 was the first announced release and as such it had no changelog. Tezt 1.0.0 was released in opam but was not announced.