我有一个失败的货物测试:
$ cargo test
[snip]
Running target/gunzip-c62d8688496249d8
running 2 tests
test test_extract_failure ... FAILED
test test_extract_success ... ok
failures:
---- test_extract_failure stdout ----
task 'test_extract_failure' panicked at 'assertion failed: result.is_err()', /home/dhardy/other/flate2-rs/tests/gunzip.rs:19
failures:
test_extract_failure
test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured
task '<main>' panicked at 'Some tests failed', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libtest/lib.rs:250
Run Code Online (Sandbox Code Playgroud)
如何在GDB之类的调试器中启动失败测试?
这应该是一个普遍的问题,但对于那些想要回溯我的步骤的人来说,安装一个最近的每晚Rust构建和:
git clone https://github.com/dhardy/flate2-rs.git
git checkout 24979640a880
cd flate2-rs
cargo test
Run Code Online (Sandbox Code Playgroud)