diff --git a/tests/close_on_drop.rs b/tests/close_on_drop.rs index c9370799b..8d9eefcca 100644 --- a/tests/close_on_drop.rs +++ b/tests/close_on_drop.rs @@ -1,3 +1,4 @@ +#![cfg(not(target_os = "wasi"))] #![cfg(all(feature = "os-poll", feature = "net"))] use std::io::Read; diff --git a/tests/events.rs b/tests/events.rs index c468e55ef..c71a0b288 100644 --- a/tests/events.rs +++ b/tests/events.rs @@ -1,3 +1,4 @@ +#![cfg(not(target_os = "wasi"))] #![cfg(all(feature = "os-poll", feature = "net"))] use std::time::Duration; diff --git a/tests/poll.rs b/tests/poll.rs index 86fdc21cf..22db7b739 100644 --- a/tests/poll.rs +++ b/tests/poll.rs @@ -1,3 +1,4 @@ +#![cfg(not(target_os = "wasi"))] #![cfg(all(feature = "os-poll", feature = "net"))] use std::net; diff --git a/tests/registering.rs b/tests/registering.rs index 4921132ae..c8415b831 100644 --- a/tests/registering.rs +++ b/tests/registering.rs @@ -1,3 +1,4 @@ +#![cfg(not(target_os = "wasi"))] #![cfg(all(feature = "os-poll", feature = "net"))] use std::io::{self, Write}; diff --git a/tests/regressions.rs b/tests/regressions.rs index f41c6cae5..0e3e5a9d8 100644 --- a/tests/regressions.rs +++ b/tests/regressions.rs @@ -1,3 +1,4 @@ +#![cfg(not(target_os = "wasi"))] #![cfg(all(feature = "os-poll", feature = "net"))] use std::io::{self, Read}; diff --git a/tests/tcp.rs b/tests/tcp.rs index 6ff38d2ca..cc08f2820 100644 --- a/tests/tcp.rs +++ b/tests/tcp.rs @@ -1,3 +1,4 @@ +#![cfg(not(target_os = "wasi"))] #![cfg(all(feature = "os-poll", feature = "net"))] use mio::net::{TcpListener, TcpStream}; diff --git a/tests/tcp_listener.rs b/tests/tcp_listener.rs index fdb1c08a9..086e619f7 100644 --- a/tests/tcp_listener.rs +++ b/tests/tcp_listener.rs @@ -1,3 +1,4 @@ +#![cfg(not(target_os = "wasi"))] #![cfg(all(feature = "os-poll", feature = "net"))] use mio::net::TcpListener; diff --git a/tests/tcp_stream.rs b/tests/tcp_stream.rs index a0c7d3b79..a2288a173 100644 --- a/tests/tcp_stream.rs +++ b/tests/tcp_stream.rs @@ -1,3 +1,4 @@ +#![cfg(not(target_os = "wasi"))] #![cfg(all(feature = "os-poll", feature = "net"))] use std::io::{self, IoSlice, IoSliceMut, Read, Write}; diff --git a/tests/udp_socket.rs b/tests/udp_socket.rs index 05caf9d21..79b5d0312 100644 --- a/tests/udp_socket.rs +++ b/tests/udp_socket.rs @@ -1,3 +1,4 @@ +#![cfg(not(target_os = "wasi"))] #![cfg(all(feature = "os-poll", feature = "net"))] use log::{debug, info}; diff --git a/tests/util/mod.rs b/tests/util/mod.rs index 3e4bb5f11..7eedc345f 100644 --- a/tests/util/mod.rs +++ b/tests/util/mod.rs @@ -1,5 +1,6 @@ // Not all functions are used by all tests. #![allow(dead_code, unused_macros)] +#![cfg(not(target_os = "wasi"))] #![cfg(all(feature = "os-poll", feature = "net"))] use std::mem::size_of; diff --git a/tests/waker.rs b/tests/waker.rs index 33998a187..56945d2cb 100644 --- a/tests/waker.rs +++ b/tests/waker.rs @@ -1,3 +1,4 @@ +#![cfg(not(target_os = "wasi"))] #![cfg(all(feature = "os-poll", feature = "net"))] use mio::{Events, Poll, Token, Waker};