Skip to content
This repository has been archived by the owner on Jan 2, 2020. It is now read-only.

Commit

Permalink
Add disable_test_ipv6 feature
Browse files Browse the repository at this point in the history
This disables IPv6 tests. Meanly aimed at Travis, since it doesn't
support IPv6.
  • Loading branch information
Thomasdezeeuw committed Nov 29, 2018
1 parent 45cb27b commit 64ce7af
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ rust:
script:
- cargo --version
- rustc --version
- cargo test --verbose
- cargo test --verbose --features disable_test_ipv6
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ log = "0.4.6"

[dev-dependencies]
env_logger = "0.6.0"

[features]
# Travis doesn't support IPv6, so we disable the tests for it.
disable_test_ipv6 = []
1 change: 1 addition & 0 deletions tests/tcp_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ fn tcp_listener() {
}

#[test]
#[cfg(not(feature="disable_test_ipv6"))]
fn tcp_listener_ipv6() {
let (mut poller, mut events) = init_with_poller();

Expand Down
1 change: 1 addition & 0 deletions tests/tcp_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ fn tcp_stream() {
}

#[test]
#[cfg(not(feature="disable_test_ipv6"))]
fn tcp_stream_ipv6() {
let (mut poller, mut events) = init_with_poller();

Expand Down

0 comments on commit 64ce7af

Please sign in to comment.