path: root/Cargo.toml
diff options
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 /Cargo.toml
parent3593df8844b80741e2d33c8e5af80e65760dc058 (diff)
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 'Cargo.toml')
1 files changed, 3 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index b8f30db..3712dbe 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,3 +20,6 @@ test-storage = []
libc = "0.2"
nitrokey-sys = "3.4"
rand = "0.6"
+nitrokey-test = {version = "0.1"}