rustc: re-enable tests on darwin

- disable doctest for stdsimd
- disable previous and some extra extra tcp tests

+126 -6
+1 -1
pkgs/development/compilers/rust/default.nix
··· 16 16 rustc = callPackage ./rustc.nix { 17 17 inherit stdenv llvm targets targetPatches targetToolchains rustPlatform version src; 18 18 19 - patches = []; 19 + patches = [ ./patches/net-tcp-disable-tests.patch ./patches/stdsimd-disable-doctest.patch ]; 20 20 21 21 forceBundledLLVM = true; 22 22
+104
pkgs/development/compilers/rust/patches/net-tcp-disable-tests.patch
··· 1 + diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs 2 + index 0f60b5b3e..9b08415e7 100644 3 + --- a/src/libstd/net/tcp.rs 4 + +++ b/src/libstd/net/tcp.rs 5 + @@ -962,6 +962,7 @@ mod tests { 6 + } 7 + } 8 + 9 + + #[cfg_attr(target_os = "macos", ignore)] 10 + #[test] 11 + fn listen_localhost() { 12 + let socket_addr = next_test_ip4(); 13 + @@ -1020,6 +1021,7 @@ mod tests { 14 + }) 15 + } 16 + 17 + + #[cfg_attr(target_os = "macos", ignore)] 18 + #[test] 19 + fn read_eof() { 20 + each_ip(&mut |addr| { 21 + @@ -1039,6 +1041,7 @@ mod tests { 22 + }) 23 + } 24 + 25 + + #[cfg_attr(target_os = "macos", ignore)] 26 + #[test] 27 + fn write_close() { 28 + each_ip(&mut |addr| { 29 + @@ -1065,6 +1068,7 @@ mod tests { 30 + }) 31 + } 32 + 33 + + #[cfg_attr(target_os = "macos", ignore)] 34 + #[test] 35 + fn multiple_connect_serial() { 36 + each_ip(&mut |addr| { 37 + @@ -1087,6 +1091,7 @@ mod tests { 38 + }) 39 + } 40 + 41 + + #[cfg_attr(target_os = "macos", ignore)] 42 + #[test] 43 + fn multiple_connect_interleaved_greedy_schedule() { 44 + const MAX: usize = 10; 45 + @@ -1123,6 +1128,7 @@ mod tests { 46 + } 47 + 48 + #[test] 49 + + #[cfg_attr(target_os = "macos", ignore)] 50 + fn multiple_connect_interleaved_lazy_schedule() { 51 + const MAX: usize = 10; 52 + each_ip(&mut |addr| { 53 + @@ -1401,6 +1407,7 @@ mod tests { 54 + } 55 + 56 + #[test] 57 + + #[cfg_attr(target_os = "macos", ignore)] 58 + fn clone_while_reading() { 59 + each_ip(&mut |addr| { 60 + let accept = t!(TcpListener::bind(&addr)); 61 + @@ -1421,7 +1422,10 @@ mod tests { 62 + 63 + // FIXME: re-enabled bitrig/openbsd tests once their socket timeout code 64 + // no longer has rounding errors. 65 + - #[cfg_attr(any(target_os = "bitrig", target_os = "netbsd", target_os = "openbsd"), ignore)] 66 + + #[cfg_attr(any(target_os = "bitrig", 67 + + target_os = "netbsd", 68 + + target_os = "openbsd", 69 + + target_os = "macos"), ignore)] 70 + #[test] 71 + fn timeouts() { 72 + let addr = next_test_ip4(); 73 + @@ -1596,6 +1603,7 @@ mod tests { 74 + drop(listener); 75 + } 76 + 77 + + #[cfg_attr(target_os = "macos", ignore)] 78 + #[test] 79 + fn nodelay() { 80 + let addr = next_test_ip4(); 81 + @@ -1610,6 +1618,7 @@ mod tests { 82 + assert_eq!(false, t!(stream.nodelay())); 83 + } 84 + 85 + + #[cfg_attr(target_os = "macos", ignore)] 86 + #[test] 87 + fn ttl() { 88 + let ttl = 100; 89 + @@ -1647,6 +1656,7 @@ mod tests { 90 + } 91 + } 92 + 93 + + #[cfg_attr(target_os = "macos", ignore)] 94 + #[test] 95 + fn peek() { 96 + each_ip(&mut |addr| { 97 + @@ -1679,6 +1689,7 @@ mod tests { 98 + } 99 + 100 + #[test] 101 + + #[cfg_attr(target_os = "linux", target_os = "macos", ignore)] 102 + fn connect_timeout_unroutable() { 103 + // this IP is unroutable, so connections should always time out, 104 + // provided the network is reachable to begin with.
+20
pkgs/development/compilers/rust/patches/stdsimd-disable-doctest.patch
··· 1 + diff --git a/src/stdsimd/coresimd/x86/mod.rs b/src/stdsimd/coresimd/x86/mod.rs 2 + index 32915c332..7cb54f31e 100644 3 + --- a/src/stdsimd/coresimd/x86/mod.rs 4 + +++ b/src/stdsimd/coresimd/x86/mod.rs 5 + @@ -279,7 +279,6 @@ types! { 6 + /// 7 + /// # Examples 8 + /// 9 + - /// ``` 10 + /// # #![feature(cfg_target_feature, target_feature, stdsimd)] 11 + /// # #![cfg_attr(not(dox), no_std)] 12 + /// # #[cfg(not(dox))] 13 + @@ -301,7 +300,6 @@ types! { 14 + /// # } 15 + /// # if is_x86_feature_detected!("sse") { unsafe { foo() } } 16 + /// # } 17 + - /// ``` 18 + pub struct __m256(f32, f32, f32, f32, f32, f32, f32, f32); 19 + 20 + /// 256-bit wide set of four `f64` types, x86-specific
+1 -5
pkgs/development/compilers/rust/rustc.nix
··· 10 10 , targets 11 11 , targetPatches 12 12 , targetToolchains 13 - 14 - # Tests frequently break on Darwin 15 - # See the rust issue: https://github.com/rust-lang/rust/issues/51006 16 - , doCheck ? (!stdenv.isDarwin) 17 - 13 + , doCheck ? true 18 14 , broken ? false 19 15 , buildPlatform, hostPlatform 20 16 } @ args: