Crates.io | etest |
lib.rs | etest |
version | |
source | src |
created_at | 2024-08-19 07:59:23.301873 |
updated_at | 2024-09-30 17:53:33.100788 |
description | Allows to control behaviour of `#[test]` like functions |
homepage | https://github.com/ensc/etest |
repository | https://gitlab-ext.sigma-chemnitz.de/ensc/etest |
max_upload_size | |
id | 1343594 |
Cargo.toml error: | TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
etest
allows to control behaviour of #[test]
like functions:
it allows to specify the maximum runtime of a test (timeout
parameter)
it allows to skip a test based on the result of another function
(skip_*
parameter class)
it allows to limit parallel execution of tests by making it dependend on resources which are simply used ("shared" usage) or consumed for the duration of test ("exclusive" usage)
#[etest(skip=is_today_monday(),
timeout=2_000,
consumes=["video", "audio"],
uses=["network"])]
fn test_00() {
do_something();
}
This test will:
be skipped at monday
will be aborted after 2 seconds
will use "video" and "audio" resources exclusively; e.g. there will be no other test running which uses one or both of these resources
will share the "network" resource; e.g. other tests which share this resource are allowed at the same time, but no tests which use it exclusively.
The code of the toplevel etest
crate (content of src
folder) is
licensed under LGPL-3.0-or-later with an exception which removes
restrictions regarding static linking.
Implementation details (crates in the etest-derive
+ etest-impl
folders) are licensed under GPL-3.0-or-later with the explicit
permission to use and distribute the generated code (the expanded
macro) under terms of your choice.
Independent tests (etest-tests
) are licensed under GPL-3.0-or-later.