Skip to content

Commit

Permalink
Disable tests that don't work on wine when --cfg wine is set
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Nov 30, 2022
1 parent d086ec1 commit 969624f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,12 @@ jobs:
runner: wine@7.13
- name: Tests
run: cargo test --all-features --target x86_64-pc-windows-gnu
env:
RUSTFLAGS: ${{ env.RUSTFLAGS }} --cfg wine
- name: Tests release build
run: cargo test --release --all-features --target x86_64-pc-windows-gnu
env:
RUSTFLAGS: ${{ env.RUSTFLAGS }} --cfg wine
# Single job required to merge the pr.
Passed:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions tests/tcp_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ fn shutdown_write() {
thread_handle.join().expect("unable to join thread");
}

#[cfg_attr(wine, ignore = "fails on Wine")]
#[test]
fn shutdown_both() {
let (mut poll, mut events) = init_with_poll();
Expand Down
3 changes: 3 additions & 0 deletions tests/udp_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ fn smoke_test_connected_udp_socket(mut socket1: UdpSocket, mut socket2: UdpSocke
assert!(socket2.take_error().unwrap().is_none());
}

#[cfg_attr(wine, ignore = "fails on Wine")]
#[test]
fn reconnect_udp_socket_sending() {
let (mut poll, mut events) = init_with_poll();
Expand Down Expand Up @@ -447,6 +448,7 @@ fn reconnect_udp_socket_sending() {
assert!(socket3.take_error().unwrap().is_none());
}

#[cfg_attr(wine, ignore = "fails on Wine")]
#[test]
fn reconnect_udp_socket_receiving() {
let (mut poll, mut events) = init_with_poll();
Expand Down Expand Up @@ -531,6 +533,7 @@ fn reconnect_udp_socket_receiving() {
assert!(socket3.take_error().unwrap().is_none());
}

#[cfg_attr(wine, ignore = "fails on Wine")]
#[test]
fn unconnected_udp_socket_connected_methods() {
let (mut poll, mut events) = init_with_poll();
Expand Down
4 changes: 2 additions & 2 deletions tests/waker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ fn waker_multiple_wakeups_different_thread() {

#[test]
#[cfg_attr(
not(debug_assertions),
ignore = "only works with debug_assertions enabled"
any(not(debug_assertions), wine),
ignore = "only works with debug_assertions enabled and non-Wine"
)]
#[should_panic = "Only a single `Waker` can be active per `Poll` instance"]
fn using_multiple_wakers_panics() {
Expand Down

0 comments on commit 969624f

Please sign in to comment.