summaryrefslogtreecommitdiff
path: root/test/sys
diff options
context:
space:
mode:
authorTim JIANG <p90eri@gmail.com>2015-07-23 17:38:18 +0800
committerCarl Lerche <me@carllerche.com>2015-07-27 10:31:26 -0700
commit08a55288d143e7674b0f7b3c302a601dcc72bdb0 (patch)
treee0d4ad627c4dcd6d15c3ebe2a8f63fa2515ef020 /test/sys
parent5801318c0c4c6eeb3431144a89496830f55d6628 (diff)
downloadnix-08a55288d143e7674b0f7b3c302a601dcc72bdb0.zip
Make it compatible for Android.
* Fixed an unused_import error in `termios.rs` for Android. * Fixed undefined references to `preadv` and `pwritev` for Android - At least they don't exist from API level 3 to 21. * Fixed the uid > 0 and gid > 0 checks in `stat`'s tests - Running the tests by root is possible, especially when running on a rooted Android device. Those changes made rust-nix buildable (again) on Android. All the tests passed as well.
Diffstat (limited to 'test/sys')
-rw-r--r--test/sys/test_uio.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/sys/test_uio.rs b/test/sys/test_uio.rs
index b12f1bb6..4261b5de 100644
--- a/test/sys/test_uio.rs
+++ b/test/sys/test_uio.rs
@@ -130,7 +130,7 @@ fn test_pread() {
}
#[test]
-#[cfg(any(target_os = "linux", target_os = "android"))]
+#[cfg(target_os = "linux")]
fn test_pwritev() {
use std::io::Read;
@@ -160,7 +160,7 @@ fn test_pwritev() {
}
#[test]
-#[cfg(any(target_os = "linux", target_os = "android"))]
+#[cfg(target_os = "linux")]
fn test_preadv() {
use std::io::Write;