Skip to content

Commit 969624f

Browse files
committed
Disable tests that don't work on wine when --cfg wine is set
1 parent d086ec1 commit 969624f

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,12 @@ jobs:
148148
runner: wine@7.13
149149
- name: Tests
150150
run: cargo test --all-features --target x86_64-pc-windows-gnu
151+
env:
152+
RUSTFLAGS: ${{ env.RUSTFLAGS }} --cfg wine
151153
- name: Tests release build
152154
run: cargo test --release --all-features --target x86_64-pc-windows-gnu
155+
env:
156+
RUSTFLAGS: ${{ env.RUSTFLAGS }} --cfg wine
153157
# Single job required to merge the pr.
154158
Passed:
155159
runs-on: ubuntu-latest

tests/tcp_stream.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ fn shutdown_write() {
348348
thread_handle.join().expect("unable to join thread");
349349
}
350350

351+
#[cfg_attr(wine, ignore = "fails on Wine")]
351352
#[test]
352353
fn shutdown_both() {
353354
let (mut poll, mut events) = init_with_poll();

tests/udp_socket.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ fn smoke_test_connected_udp_socket(mut socket1: UdpSocket, mut socket2: UdpSocke
384384
assert!(socket2.take_error().unwrap().is_none());
385385
}
386386

387+
#[cfg_attr(wine, ignore = "fails on Wine")]
387388
#[test]
388389
fn reconnect_udp_socket_sending() {
389390
let (mut poll, mut events) = init_with_poll();
@@ -447,6 +448,7 @@ fn reconnect_udp_socket_sending() {
447448
assert!(socket3.take_error().unwrap().is_none());
448449
}
449450

451+
#[cfg_attr(wine, ignore = "fails on Wine")]
450452
#[test]
451453
fn reconnect_udp_socket_receiving() {
452454
let (mut poll, mut events) = init_with_poll();
@@ -531,6 +533,7 @@ fn reconnect_udp_socket_receiving() {
531533
assert!(socket3.take_error().unwrap().is_none());
532534
}
533535

536+
#[cfg_attr(wine, ignore = "fails on Wine")]
534537
#[test]
535538
fn unconnected_udp_socket_connected_methods() {
536539
let (mut poll, mut events) = init_with_poll();

tests/waker.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ fn waker_multiple_wakeups_different_thread() {
109109

110110
#[test]
111111
#[cfg_attr(
112-
not(debug_assertions),
113-
ignore = "only works with debug_assertions enabled"
112+
any(not(debug_assertions), wine),
113+
ignore = "only works with debug_assertions enabled and non-Wine"
114114
)]
115115
#[should_panic = "Only a single `Waker` can be active per `Poll` instance"]
116116
fn using_multiple_wakers_panics() {

0 commit comments

Comments
 (0)