@@ -727,6 +727,7 @@ mod test {
727
727
use rt:: test:: * ;
728
728
use cell:: Cell ;
729
729
use iter:: Times ;
730
+ use rt:: util;
730
731
731
732
#[ test]
732
733
fn oneshot_single_thread_close_port_first ( ) {
@@ -875,6 +876,7 @@ mod test {
875
876
876
877
#[ test]
877
878
fn oneshot_multi_thread_close_stress ( ) {
879
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
878
880
do stress_factor ( ) . times {
879
881
do run_in_newsched_task {
880
882
let ( port, chan) = oneshot :: < int > ( ) ;
@@ -890,6 +892,7 @@ mod test {
890
892
891
893
#[ test]
892
894
fn oneshot_multi_thread_send_close_stress ( ) {
895
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
893
896
do stress_factor ( ) . times {
894
897
do run_in_newsched_task {
895
898
let ( port, chan) = oneshot :: < int > ( ) ;
@@ -910,6 +913,7 @@ mod test {
910
913
911
914
#[ test]
912
915
fn oneshot_multi_thread_recv_close_stress ( ) {
916
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
913
917
do stress_factor ( ) . times {
914
918
do run_in_newsched_task {
915
919
let ( port, chan) = oneshot :: < int > ( ) ;
@@ -936,6 +940,7 @@ mod test {
936
940
937
941
#[ test]
938
942
fn oneshot_multi_thread_send_recv_stress ( ) {
943
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
939
944
do stress_factor ( ) . times {
940
945
do run_in_newsched_task {
941
946
let ( port, chan) = oneshot :: < ~int > ( ) ;
@@ -955,6 +960,7 @@ mod test {
955
960
956
961
#[ test]
957
962
fn stream_send_recv_stress ( ) {
963
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
958
964
do stress_factor ( ) . times {
959
965
do run_in_mt_newsched_task {
960
966
let ( port, chan) = stream :: < ~int > ( ) ;
@@ -999,6 +1005,7 @@ mod test {
999
1005
1000
1006
#[ test]
1001
1007
fn shared_chan_stress ( ) {
1008
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
1002
1009
do run_in_mt_newsched_task {
1003
1010
let ( port, chan) = stream ( ) ;
1004
1011
let chan = SharedChan :: new ( chan) ;
@@ -1018,6 +1025,7 @@ mod test {
1018
1025
1019
1026
#[ test]
1020
1027
fn shared_port_stress ( ) {
1028
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
1021
1029
do run_in_mt_newsched_task {
1022
1030
// XXX: Removing these type annotations causes an ICE
1023
1031
let ( end_port, end_chan) = stream :: < ( ) > ( ) ;
@@ -1098,6 +1106,8 @@ mod test {
1098
1106
use rand;
1099
1107
use rand:: RngUtil ;
1100
1108
1109
+ if util:: limit_thread_creation_due_to_osx_and_valgrind ( ) { return ; }
1110
+
1101
1111
do run_in_mt_newsched_task {
1102
1112
let ( end_port, end_chan) = stream :: < ( ) > ( ) ;
1103
1113
let end_chan = SharedChan :: new ( end_chan) ;
0 commit comments