switch off rdroidtest
rdroidtest doesn't work correctly with on-device tests because they use
`panic = "abort"` and rdroidtest doesn't support `-Zpanic-abort-tests`
yet. The result is that all test failure look like a "native crash" and
the test infra cannot correctly track them via bugs or display them in
the UI.
The only `rdroidtest` specific feature we used was `ignore_if`. It is a
bit of a loss to have ignored tests reported as passing, but it is a
lesser evil in this case.
Bug: 291169704
Bug: 384438979
Test: atest libdm_rust.test
Change-Id: I23af380c79a87d246a1f50e163415021d7f5fa84
diff --git a/libs/devicemapper/src/loopdevice.rs b/libs/devicemapper/src/loopdevice.rs
index 30ab6f6..e41b90c 100644
--- a/libs/devicemapper/src/loopdevice.rs
+++ b/libs/devicemapper/src/loopdevice.rs
@@ -179,7 +179,6 @@
#[cfg(test)]
mod tests {
use super::*;
- use rdroidtest::rdroidtest;
use std::fs;
use std::path::Path;
@@ -205,7 +204,7 @@
"1" == fs::read_to_string(autoclear).unwrap().trim()
}
- #[rdroidtest]
+ #[test]
fn attach_loop_device_with_dio() {
let a_dir = tempfile::TempDir::new().unwrap();
let a_file = a_dir.path().join("test");
@@ -221,7 +220,7 @@
assert!(is_direct_io(&dev));
}
- #[rdroidtest]
+ #[test]
fn attach_loop_device_without_dio() {
let a_dir = tempfile::TempDir::new().unwrap();
let a_file = a_dir.path().join("test");
@@ -234,7 +233,7 @@
assert!(!is_direct_io(&dev));
}
- #[rdroidtest]
+ #[test]
fn attach_loop_device_with_dio_writable() {
let a_dir = tempfile::TempDir::new().unwrap();
let a_file = a_dir.path().join("test");
@@ -255,7 +254,7 @@
assert!(is_direct_io_writable(&dev));
}
- #[rdroidtest]
+ #[test]
fn attach_loop_device_autoclear() {
let a_dir = tempfile::TempDir::new().unwrap();
let a_file = a_dir.path().join("test");