diff --git a/.cirrus.yml b/.cirrus.yml index 75eccc81b..125afa4cd 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -12,7 +12,8 @@ task: setup_script: - pkg install -y curl - curl https://sh.rustup.rs -sSf --output rustup.sh - - sh rustup.sh -y --default-toolchain nightly + # TODO: switch back to nightly + - sh rustup.sh -y --default-toolchain nightly-2019-06-10 - . $HOME/.cargo/env - rustup target add i686-unknown-freebsd - | @@ -32,8 +33,6 @@ task: test_script: - . $HOME/.cargo/env - cargo test --all --lib && cargo test --all --tests - - (cd tokio-trace/test-log-support && cargo test) - - (cd tokio-trace/test_static_max_level_features && cargo test) - cargo doc --all # TODO: Re-enable # i686_test_script: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c39e8ca65..be2b84439 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -31,7 +31,7 @@ jobs: # - tokio-fs - tokio-reactor # - tokio-signal -# - tokio-tcp + - tokio-tcp # - tokio-tls - tokio-udp # - tokio-uds @@ -51,8 +51,8 @@ jobs: - tokio-macros - tokio-sync # - tokio-threadpool - # - tokio-timer - # - tokio-test + - tokio-timer + - tokio-test # - tokio-trace # - tokio-trace/tokio-trace-core # - tokio-trace/test-log-support diff --git a/tokio-tcp/tests/chain.rs b/tokio-tcp/tests/chain.rs index a8531058a..3c9b9297d 100644 --- a/tokio-tcp/tests/chain.rs +++ b/tokio-tcp/tests/chain.rs @@ -1,4 +1,5 @@ #![deny(warnings, rust_2018_idioms)] +#![cfg(feature = "broken")] use futures::stream::Stream; use futures::Future; diff --git a/tokio-tcp/tests/echo.rs b/tokio-tcp/tests/echo.rs index 42a00d2bf..cebd366fb 100644 --- a/tokio-tcp/tests/echo.rs +++ b/tokio-tcp/tests/echo.rs @@ -1,4 +1,5 @@ #![deny(warnings, rust_2018_idioms)] +#![cfg(feature = "broken")] use env_logger; use futures::stream::Stream; diff --git a/tokio-tcp/tests/limit.rs b/tokio-tcp/tests/limit.rs index 63ac8fd03..47fa56506 100644 --- a/tokio-tcp/tests/limit.rs +++ b/tokio-tcp/tests/limit.rs @@ -1,4 +1,5 @@ #![deny(warnings, rust_2018_idioms)] +#![cfg(feature = "broken")] use futures::stream::Stream; use futures::Future; diff --git a/tokio-tcp/tests/stream-buffered.rs b/tokio-tcp/tests/stream-buffered.rs index df2fe98fa..d30323036 100644 --- a/tokio-tcp/tests/stream-buffered.rs +++ b/tokio-tcp/tests/stream-buffered.rs @@ -1,4 +1,5 @@ #![deny(warnings, rust_2018_idioms)] +#![cfg(feature = "broken")] use env_logger; use futures::stream::Stream; diff --git a/tokio-tcp/tests/tcp.rs b/tokio-tcp/tests/tcp.rs index b35baf464..99211972f 100644 --- a/tokio-tcp/tests/tcp.rs +++ b/tokio-tcp/tests/tcp.rs @@ -1,4 +1,5 @@ #![deny(warnings, rust_2018_idioms)] +#![cfg(feature = "broken")] use env_logger; use futures::{Future, Stream}; diff --git a/tokio-test/src/macros.rs b/tokio-test/src/macros.rs index 722bbd681..ff3b6eb26 100644 --- a/tokio-test/src/macros.rs +++ b/tokio-test/src/macros.rs @@ -112,44 +112,3 @@ macro_rules! assert_elapsed { }; } */ - -#[cfg(test)] -mod tests { - use futures::{future, Async, Future, Poll}; - - #[test] - fn assert_ready() { - let mut fut = future::ok::<(), ()>(()); - assert_ready!(fut.poll()); - let mut fut = future::ok::<(), ()>(()); - assert_ready!(fut.poll(), "some message"); - } - - #[test] - #[should_panic] - fn assert_ready_err() { - let mut fut = future::err::<(), ()>(()); - assert_ready!(fut.poll()); - } - - #[test] - fn assert_not_ready() { - let poll: Poll<(), ()> = Ok(Async::NotReady); - assert_not_ready!(poll); - assert_not_ready!(poll, "some message"); - } - - #[test] - #[should_panic] - fn assert_not_ready_err() { - let mut fut = future::err::<(), ()>(()); - assert_not_ready!(fut.poll()); - } - - #[test] - fn assert_ready_eq() { - let mut fut = future::ok::<(), ()>(()); - assert_ready_eq!(fut.poll(), ()); - } - -} diff --git a/tokio-test/tests/clock.rs b/tokio-test/tests/clock.rs index a57edd72d..082ce311a 100644 --- a/tokio-test/tests/clock.rs +++ b/tokio-test/tests/clock.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "broken")] #![deny(warnings, rust_2018_idioms)] use futures::Future; diff --git a/tokio-test/tests/macros.rs b/tokio-test/tests/macros.rs new file mode 100644 index 000000000..2dd519eb6 --- /dev/null +++ b/tokio-test/tests/macros.rs @@ -0,0 +1,40 @@ +#![cfg(feature = "broken")] +#![deny(warnings, rust_2018_idioms)] + +use tokio_macros::{assert_ready, assert_not_ready, assert_ready_eq}; +use futures::{future, Async, Future, Poll}; + +#[test] +fn assert_ready() { + let mut fut = future::ok::<(), ()>(()); + assert_ready!(fut.poll()); + let mut fut = future::ok::<(), ()>(()); + assert_ready!(fut.poll(), "some message"); +} + +#[test] +#[should_panic] +fn assert_ready_err() { + let mut fut = future::err::<(), ()>(()); + assert_ready!(fut.poll()); +} + +#[test] +fn assert_not_ready() { + let poll: Poll<(), ()> = Ok(Async::NotReady); + assert_not_ready!(poll); + assert_not_ready!(poll, "some message"); +} + +#[test] +#[should_panic] +fn assert_not_ready_err() { + let mut fut = future::err::<(), ()>(()); + assert_not_ready!(fut.poll()); +} + +#[test] +fn assert_ready_eq() { + let mut fut = future::ok::<(), ()>(()); + assert_ready_eq!(fut.poll(), ()); +} diff --git a/tokio-timer/tests/clock.rs b/tokio-timer/tests/clock.rs index d75f3d377..d1607ba3f 100644 --- a/tokio-timer/tests/clock.rs +++ b/tokio-timer/tests/clock.rs @@ -1,4 +1,5 @@ #![deny(warnings, rust_2018_idioms)] +#![cfg(feature = "broken")] use std::time::Instant; use tokio_executor; diff --git a/tokio-timer/tests/deadline.rs b/tokio-timer/tests/deadline.rs index 712cc5f37..bdadc88a4 100644 --- a/tokio-timer/tests/deadline.rs +++ b/tokio-timer/tests/deadline.rs @@ -1,5 +1,6 @@ #![deny(warnings, rust_2018_idioms)] #![allow(deprecated)] +#![cfg(feature = "broken")] mod support; use crate::support::*; diff --git a/tokio-timer/tests/delay.rs b/tokio-timer/tests/delay.rs index 430662600..d18919cac 100644 --- a/tokio-timer/tests/delay.rs +++ b/tokio-timer/tests/delay.rs @@ -1,4 +1,5 @@ #![deny(warnings, rust_2018_idioms)] +#![cfg(feature = "broken")] mod support; use crate::support::*; diff --git a/tokio-timer/tests/hammer.rs b/tokio-timer/tests/hammer.rs index 16e86e1a2..8d9bccf2d 100644 --- a/tokio-timer/tests/hammer.rs +++ b/tokio-timer/tests/hammer.rs @@ -1,4 +1,5 @@ #![deny(warnings, rust_2018_idioms)] +#![cfg(feature = "broken")] use futures::stream::FuturesUnordered; use futures::{Future, Stream}; diff --git a/tokio-timer/tests/interval.rs b/tokio-timer/tests/interval.rs index 9b6125852..cb7bb7428 100644 --- a/tokio-timer/tests/interval.rs +++ b/tokio-timer/tests/interval.rs @@ -1,4 +1,5 @@ #![deny(warnings, rust_2018_idioms)] +#![cfg(feature = "broken")] mod support; use crate::support::*; diff --git a/tokio-timer/tests/queue.rs b/tokio-timer/tests/queue.rs index b11ec6066..969fb7bcc 100644 --- a/tokio-timer/tests/queue.rs +++ b/tokio-timer/tests/queue.rs @@ -1,4 +1,5 @@ #![deny(warnings, rust_2018_idioms)] +#![cfg(feature = "broken")] mod support; use crate::support::*; diff --git a/tokio-timer/tests/throttle.rs b/tokio-timer/tests/throttle.rs index 96c384c75..022b01e45 100644 --- a/tokio-timer/tests/throttle.rs +++ b/tokio-timer/tests/throttle.rs @@ -1,4 +1,5 @@ #![deny(warnings, rust_2018_idioms)] +#![cfg(feature = "broken")] mod support; use crate::support::*; diff --git a/tokio-timer/tests/timeout.rs b/tokio-timer/tests/timeout.rs index 9e9a808af..5dada019d 100644 --- a/tokio-timer/tests/timeout.rs +++ b/tokio-timer/tests/timeout.rs @@ -1,4 +1,5 @@ #![deny(warnings, rust_2018_idioms)] +#![cfg(feature = "broken")] mod support; use crate::support::*;