I'm in the process of packaging this crate for debian. It compiles fine, but the tests fail:
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests usb-disk-probe
Running `rustdoc --edition=2018 --crate-type lib --crate-name usb_disk_probe --test /<<PKGBUILDDIR>>/src/lib.rs -L dependency=/<<PKGBUILDDIR>>/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/<<PKGBUILDDIR>>/target/debug/deps --extern async_std=/<<PKGBUILDDIR>>/target/x86_64-unknown-linux-gnu/debug/deps/libasync_std-908a3a12389b5cc2.rlib --extern futures=/<<PKGBUILDDIR>>/target/x86_64-unknown-linux-gnu/debug/deps/libfutures-c69f20b72e1ebb3a.rlib --extern thiserror=/<<PKGBUILDDIR>>/target/x86_64-unknown-linux-gnu/debug/deps/libthiserror-1aae4e5d7abcfc04.rlib --extern usb_disk_probe=/<<PKGBUILDDIR>>/target/x86_64-unknown-linux-gnu/debug/deps/libusb_disk_probe-d0a230397d6c474c.rlib -C embed-bitcode=no --error-format human`
running 1 test
test src/stream.rs - stream::UsbDiskProbe (line 27) ... FAILED
failures:
---- src/stream.rs - stream::UsbDiskProbe (line 27) stdout ----
Test executable failed (exit status: 101).
stderr:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Open(Custom { kind: NotFound, error: VerboseError { source: Os { code: 2, kind: NotFound, message: "No such file or directory" }, message: "could not read directory `/dev/disk/by-path/`" } })', src/stream.rs:9:52
stack backtrace:
0: rust_begin_unwind
at /usr/src/rustc-1.62.1/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /usr/src/rustc-1.62.1/library/core/src/panicking.rs:142:14
2: core::result::unwrap_failed
at /usr/src/rustc-1.62.1/library/core/src/result.rs:1785:5
3: core::result::Result<T,E>::unwrap
4: rust_out::main::{{closure}}
5: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
6: futures_executor::local_pool::block_on::{{closure}}
7: futures_executor::local_pool::run_executor::{{closure}}
8: std::thread::local::LocalKey<T>::try_with
9: std::thread::local::LocalKey<T>::with
10: futures_executor::local_pool::run_executor
11: futures_executor::local_pool::block_on
12: rust_out::main
13: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
failures:
src/stream.rs - stream::UsbDiskProbe (line 27)
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.11s
Could you maybe shed some light on this? I'd appreciate it.