summaryrefslogtreecommitdiff
path: root/test/test.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-05-20 03:03:32 +0000
committerGitHub <noreply@github.com>2020-05-20 03:03:32 +0000
commitd950c481abe5fb11cdbd648c67c8022c6c209664 (patch)
treea7b59c4359517d11228a5220c99aca4bb4e5396a /test/test.rs
parentd3fef370b843e0ffd6fc6df6e80d9bbe0d024863 (diff)
parentb05c3dc9d86f5957ad8963491cf735b74ea2c70d (diff)
downloadnix-d950c481abe5fb11cdbd648c67c8022c6c209664.zip
Merge #1098
1098: Add Redox support for most of the modules r=asomers a=AdminXVII Some things are not implemented yet in redox, so a lot of annotations were added to remove functions when compiling for redox. Those functions will hopefully be added in time, but for now it's better to have partial support than none. Blocked by https://github.com/rust-lang/libc/pull/1438 Co-authored-by: Xavier L'Heureux <xavier.lheureux@icloud.com> Co-authored-by: Xavier L'Heureux <dev.xlheureux@gmail.com>
Diffstat (limited to 'test/test.rs')
-rw-r--r--test/test.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/test.rs b/test/test.rs
index 0efe9bd6..5319c1d8 100644
--- a/test/test.rs
+++ b/test/test.rs
@@ -3,7 +3,7 @@ extern crate bytes;
extern crate caps;
#[macro_use]
extern crate cfg_if;
-#[macro_use]
+#[cfg_attr(not(target_os = "redox"), macro_use)]
extern crate nix;
#[macro_use]
extern crate lazy_static;
@@ -33,7 +33,7 @@ cfg_if! {
}
}
}
- } else {
+ } else if #[cfg(not(target_os = "redox"))] {
macro_rules! require_capability {
($capname:ident) => {}
}
@@ -58,6 +58,7 @@ macro_rules! skip_if_jailed {
}
}
+#[cfg(not(target_os = "redox"))]
macro_rules! skip_if_not_root {
($name:expr) => {
use nix::unistd::Uid;
@@ -94,7 +95,7 @@ cfg_if! {
}
}
}
- } else {
+ } else if #[cfg(not(target_os = "redox"))] {
macro_rules! skip_if_seccomp {
($name:expr) => {}
}
@@ -134,6 +135,7 @@ cfg_if! {
}
mod sys;
+#[cfg(not(target_os = "redox"))]
mod test_dir;
mod test_fcntl;
#[cfg(any(target_os = "android",
@@ -145,9 +147,11 @@ mod test_kmod;
target_os = "linux",
target_os = "netbsd"))]
mod test_mq;
+#[cfg(not(target_os = "redox"))]
mod test_net;
mod test_nix_path;
mod test_poll;
+#[cfg(not(target_os = "redox"))]
mod test_pty;
#[cfg(any(target_os = "android",
target_os = "linux"))]