about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorMoritz Ulrich <moritz@tarn-vedra.de>2016-07-31 20:06:01 +0200
committerMoritz Ulrich <moritz@tarn-vedra.de>2016-08-10 21:16:37 +0200
commit899d02642672005a3e65d71d9cbf5908601f094c (patch)
tree6a4a25671fc92f6859111f5644970353ccf89242 /pkgs/development
parent12fe1549536ce10e445b8520dd64dde4cac43ce7 (diff)
downloadnixlib-899d02642672005a3e65d71d9cbf5908601f094c.tar
nixlib-899d02642672005a3e65d71d9cbf5908601f094c.tar.gz
nixlib-899d02642672005a3e65d71d9cbf5908601f094c.tar.bz2
nixlib-899d02642672005a3e65d71d9cbf5908601f094c.tar.lz
nixlib-899d02642672005a3e65d71d9cbf5908601f094c.tar.xz
nixlib-899d02642672005a3e65d71d9cbf5908601f094c.tar.zst
nixlib-899d02642672005a3e65d71d9cbf5908601f094c.zip
rustUnstable.rustc: Fix tests by disabling lowering thread-count.
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/rust/head.nix6
-rw-r--r--pkgs/development/compilers/rust/patches/tcp-stress-test-run-a-smaller-number-of-threads.patch44
2 files changed, 48 insertions, 2 deletions
diff --git a/pkgs/development/compilers/rust/head.nix b/pkgs/development/compilers/rust/head.nix
index 5cedc4b72a9a..9befaca86daa 100644
--- a/pkgs/development/compilers/rust/head.nix
+++ b/pkgs/development/compilers/rust/head.nix
@@ -6,10 +6,12 @@ rec {
     shortVersion = "master-1.12.0";
     forceBundledLLVM = false;
     needsCmake = true;
-    srcRev = "c77f8ce7c3284441a00faed6782d08eb5a78296c";
-    srcSha = "11y24bm2rj7bzsf86iyx3v286ygxprch4c804qbl1w477mkhcac7";
+    configureFlags = [ "--release-channel=nightly" ];
+    srcRev = "d9a911d236cbecb47775276ba51a5f9111bdbc9c";
+    srcSha = "07wybqvnw99fljmcy33vb9iwirmp10cwy47n008p396s7pb852hv";
     patches = [
       ./patches/disable-lockfile-check.patch
+      ./patches/tcp-stress-test-run-a-smaller-number-of-threads.patch
     ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
     inherit targets;
     inherit targetPatches;
diff --git a/pkgs/development/compilers/rust/patches/tcp-stress-test-run-a-smaller-number-of-threads.patch b/pkgs/development/compilers/rust/patches/tcp-stress-test-run-a-smaller-number-of-threads.patch
new file mode 100644
index 000000000000..1b1d62160f65
--- /dev/null
+++ b/pkgs/development/compilers/rust/patches/tcp-stress-test-run-a-smaller-number-of-threads.patch
@@ -0,0 +1,44 @@
+From b6202b5d602ca8216febe8ce9078581faa32955e Mon Sep 17 00:00:00 2001
+From: Moritz Ulrich <moritz@tarn-vedra.de>
+Date: Sat, 30 Jul 2016 09:01:13 +0200
+Subject: [PATCH] tcp-stress-test: Run a smaller number of threads.
+
+---
+ src/test/run-pass/tcp-stress.rs | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/test/run-pass/tcp-stress.rs b/src/test/run-pass/tcp-stress.rs
+index dfc8649..df8cdc9 100644
+--- a/src/test/run-pass/tcp-stress.rs
++++ b/src/test/run-pass/tcp-stress.rs
+@@ -21,6 +21,8 @@ use std::sync::mpsc::channel;
+ use std::time::Duration;
+ use std::thread::{self, Builder};
+ 
++const TARGET_CNT: usize = 256;
++
+ fn main() {
+     // This test has a chance to time out, try to not let it time out
+     thread::spawn(move|| -> () {
+@@ -42,8 +44,9 @@ fn main() {
+     });
+ 
+     let (tx, rx) = channel();
++
+     let mut spawned_cnt = 0;
+-    for _ in 0..1000 {
++    for _ in 0..TARGET_CNT {
+         let tx = tx.clone();
+         let res = Builder::new().stack_size(64 * 1024).spawn(move|| {
+             match TcpStream::connect(addr) {
+@@ -66,6 +69,6 @@ fn main() {
+     for _ in 0..spawned_cnt {
+         rx.recv().unwrap();
+     }
+-    assert_eq!(spawned_cnt, 1000);
++    assert_eq!(spawned_cnt, TARGET_CNT);
+     process::exit(0);
+ }
+-- 
+2.9.1
+