@@ -692,6 +692,7 @@ mod test {
692
692
use rt:: test:: * ;
693
693
use cell:: Cell ;
694
694
use iter:: Times ;
695
+ use rt:: util;
695
696
696
697
#[ test]
697
698
fn oneshot_single_thread_close_port_first ( ) {
@@ -840,6 +841,7 @@ mod test {
840
841
841
842
#[ test]
842
843
fn oneshot_multi_thread_close_stress ( ) {
844
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
843
845
do stress_factor ( ) . times {
844
846
do run_in_newsched_task {
845
847
let ( port, chan) = oneshot :: < int > ( ) ;
@@ -855,6 +857,7 @@ mod test {
855
857
856
858
#[ test]
857
859
fn oneshot_multi_thread_send_close_stress ( ) {
860
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
858
861
do stress_factor ( ) . times {
859
862
do run_in_newsched_task {
860
863
let ( port, chan) = oneshot :: < int > ( ) ;
@@ -875,6 +878,7 @@ mod test {
875
878
876
879
#[ test]
877
880
fn oneshot_multi_thread_recv_close_stress ( ) {
881
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
878
882
do stress_factor ( ) . times {
879
883
do run_in_newsched_task {
880
884
let ( port, chan) = oneshot :: < int > ( ) ;
@@ -901,6 +905,7 @@ mod test {
901
905
902
906
#[ test]
903
907
fn oneshot_multi_thread_send_recv_stress ( ) {
908
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
904
909
do stress_factor ( ) . times {
905
910
do run_in_newsched_task {
906
911
let ( port, chan) = oneshot :: < ~int > ( ) ;
@@ -920,6 +925,7 @@ mod test {
920
925
921
926
#[ test]
922
927
fn stream_send_recv_stress ( ) {
928
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
923
929
do stress_factor ( ) . times {
924
930
do run_in_mt_newsched_task {
925
931
let ( port, chan) = stream :: < ~int > ( ) ;
@@ -964,6 +970,7 @@ mod test {
964
970
965
971
#[ test]
966
972
fn shared_chan_stress ( ) {
973
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
967
974
do run_in_mt_newsched_task {
968
975
let ( port, chan) = stream ( ) ;
969
976
let chan = SharedChan :: new ( chan) ;
@@ -983,6 +990,7 @@ mod test {
983
990
984
991
#[ test]
985
992
fn shared_port_stress ( ) {
993
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
986
994
do run_in_mt_newsched_task {
987
995
// XXX: Removing these type annotations causes an ICE
988
996
let ( end_port, end_chan) = stream :: < ( ) > ( ) ;
@@ -1063,6 +1071,8 @@ mod test {
1063
1071
use rand;
1064
1072
use rand:: RngUtil ;
1065
1073
1074
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
1075
+
1066
1076
do run_in_mt_newsched_task {
1067
1077
let ( end_port, end_chan) = stream :: < ( ) > ( ) ;
1068
1078
let end_chan = SharedChan :: new ( end_chan) ;
0 commit comments