summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2018-12-29 11:52:42 -0800
committerRobin Krahl <robin.krahl@ireas.org>2019-01-05 10:26:16 +0100
commit65bff57e6139cc126191d4faabbcf74118932dd2 (patch)
treee67bf4ec413c7d0a6459b5ac4df8f40198441858 /src/lib.rs
parent3593df8844b80741e2d33c8e5af80e65760dc058 (diff)
downloadnitrokey-rs-65bff57e6139cc126191d4faabbcf74118932dd2.tar.gz
nitrokey-rs-65bff57e6139cc126191d4faabbcf74118932dd2.tar.bz2
Use nitrokey-test for nitrokey device tests
This change is the first in a series to migrate the existing tests to using the nitrokey-test crate. The crate provides a couple of benefits over the existing way testing works: - test execution is automatically serialized (i.e., no more need for --test-threads) - available devices are detected at runtime (i.e., no more need for --features test-pro) - tests capable of running only on a specific device are automatically skipped if this device is not present In addition to that, the crate also offers selection of particular groups of tests by virtue of the NITROKEY_TEST_GROUP environment variable. If set (valid values are "nodev", "pro", and "storage") only tests of the particular group are run (those tests will fail if a required precondition is not met, i.e., if a device is present but "nodev" is set, or if the "pro" group is run but no device or a storage device is present). Unfortunately, it has some limitations as well. Most importantly Rust does not allow us to indicate whether a test has been skipped or not. While it has #[ignore] support, that strictly is a compile-time feature and, hence, not usable. This patch in particular pulls in the nitrokey-test crate and adjusts the existing device tests to make use of it.
Diffstat (limited to 'src/lib.rs')
0 files changed, 0 insertions, 0 deletions