@@ -112,6 +112,7 @@ def __init__(self, *args, **kwargs):
112
112
extra_script = extra_script ,
113
113
EXTRA_CONFIGURE_FLAGS = "-DENABLE_PIC=ON -DENABLE_MONGOC=OFF" ,
114
114
SKIP_MOCK_TESTS = "ON" ,
115
+ USE_CRYPT_SHARED = "${USE_CRYPT_SHARED}" ,
115
116
** kwargs )
116
117
self .add_tags ('client-side-encryption' , 'special' )
117
118
@@ -134,10 +135,12 @@ def __init__(self, *args, **kwargs):
134
135
CFLAGS = "-fno-omit-frame-pointer" ,
135
136
extra_script = extra_script ,
136
137
CHECK_LOG = "ON" ,
137
- sanitize = ['address' ],
138
+ sanitize = [
139
+ 'address' ],
138
140
EXTRA_CONFIGURE_FLAGS = "-DENABLE_PIC=ON -DENABLE_MONGOC=OFF -DENABLE_EXTRA_ALIGNMENT=OFF" ,
139
141
PATH = '/usr/lib/llvm-3.8/bin:$PATH' ,
140
142
SKIP_MOCK_TESTS = "ON" ,
143
+ USE_CRYPT_SHARED = "${USE_CRYPT_SHARED}" ,
141
144
** kwargs )
142
145
self .add_tags ('client-side-encryption' )
143
146
@@ -456,19 +459,23 @@ def __init__(self, task_name, suffix_commands, orchestration=True, **kwargs):
456
459
('bucket' , 'mongo-c-toolchain' ),
457
460
('local_file' , 'mongo-c-toolchain.tar.gz' ),
458
461
]))]),
459
- shell_mongoc ('sh ./.evergreen/build-and-test-with-toolchain.sh' )
460
- ])
462
+ shell_mongoc (
463
+ 'sh ./.evergreen/build-and-test-with-toolchain.sh' )
464
+ ])
461
465
]
462
466
467
+
463
468
class IntegrationTask (MatrixTask ):
464
469
axes = OD ([('valgrind' , ['valgrind' , False ]),
465
470
('sanitizer' , ['asan' , 'tsan' , False ]),
466
471
('coverage' , ['coverage' , False ]),
467
- ('version' , ['latest' , '6.0' , '5.0' , '4.4' , '4.2' , '4.0' , '3.6' ]),
472
+ ('version' , ['latest' , '6.0' , '5.0' ,
473
+ '4.4' , '4.2' , '4.0' , '3.6' ]),
468
474
('topology' , ['server' , 'replica_set' , 'sharded_cluster' ]),
469
475
('auth' , [True , False ]),
470
476
('sasl' , ['sasl' , 'sspi' , False ]),
471
- ('ssl' , ['openssl' , 'openssl-static' , 'darwinssl' , 'winssl' , False ]),
477
+ ('ssl' , ['openssl' , 'openssl-static' ,
478
+ 'darwinssl' , 'winssl' , False ]),
472
479
('cse' , [True , False ])])
473
480
474
481
def __init__ (self , * args , ** kwargs ):
@@ -562,12 +569,12 @@ def to_dict(self):
562
569
563
570
def _check_allowed (self ):
564
571
if self .sanitizer == 'tsan' :
565
- require (self .ssl == 'openssl' )
566
- prohibit (self .sasl )
567
- prohibit (self .valgrind )
568
- prohibit (self .coverage )
569
- prohibit (self .cse )
570
- prohibit (self .version == "3.0" )
572
+ require (self .ssl == 'openssl' )
573
+ prohibit (self .sasl )
574
+ prohibit (self .valgrind )
575
+ prohibit (self .coverage )
576
+ prohibit (self .cse )
577
+ prohibit (self .version == "3.0" )
571
578
572
579
if self .valgrind :
573
580
prohibit (self .cse )
@@ -613,7 +620,8 @@ def _check_allowed(self):
613
620
prohibit (self .ssl )
614
621
615
622
if self .cse :
616
- require (self .version == 'latest' or parse_version (self .version ) >= parse_version ("4.2" ))
623
+ require (self .version == 'latest' or parse_version (
624
+ self .version ) >= parse_version ("4.2" ))
617
625
if self .version == 'latest' or parse_version (self .version ) >= parse_version ("6.0" ):
618
626
# FLE 2.0 Client-Side Encryption tasks on 6.0 require a non-standalone topology.
619
627
require (self .topology in ('server' , 'replica_set' ))
@@ -668,8 +676,9 @@ def to_dict(self):
668
676
dns = 'on'
669
677
if self .loadbalanced :
670
678
dns = 'loadbalanced'
671
- commands .append (func ("clone drivers-evergreen-tools" ))
672
- commands .append (func ("start load balancer" , MONGODB_URI = "mongodb://localhost:27017,localhost:27018" ))
679
+ commands .append (func ("clone drivers-evergreen-tools" ))
680
+ commands .append (func (
681
+ "start load balancer" , MONGODB_URI = "mongodb://localhost:27017,localhost:27018" ))
673
682
elif self .auth :
674
683
dns = 'dns-auth'
675
684
commands .append (run_tests (SSL = 'ssl' ,
@@ -679,9 +688,9 @@ def to_dict(self):
679
688
return task
680
689
681
690
def _check_allowed (self ):
682
- prohibit (self .loadbalanced and self .auth )
691
+ prohibit (self .loadbalanced and self .auth )
683
692
# Load balancer tests only run on some Linux hosts in Evergreen until CDRIVER-4041 is resolved.
684
- prohibit (self .loadbalanced and self .ssl in ["darwinssl" , "winssl" ])
693
+ prohibit (self .loadbalanced and self .ssl in ["darwinssl" , "winssl" ])
685
694
686
695
687
696
all_tasks = chain (all_tasks , DNSTask .matrix ())
@@ -920,7 +929,8 @@ def name(self):
920
929
SSLTask ('openssl-1.0.2' , 'l' ),
921
930
SSLTask ('openssl-1.1.0' , 'f' ),
922
931
SSLTask ('libressl-2.5' , '.2' , require_tls12 = True ),
923
- SSLTask ('libressl-3.0' , '.2' , require_tls12 = True , enable_ssl = "AUTO" , cflags = "-Wno-redundant-decls" ),
932
+ SSLTask ('libressl-3.0' , '.2' , require_tls12 = True ,
933
+ enable_ssl = "AUTO" , cflags = "-Wno-redundant-decls" ),
924
934
SSLTask ('libressl-3.0' , '.2' , require_tls12 = True ),
925
935
])
926
936
@@ -986,7 +996,8 @@ def __init__(self, *args, **kwargs):
986
996
self .add_dependency ('debug-compile-aws' )
987
997
self .commands .extend ([
988
998
func ('fetch build' , BUILD_NAME = self .depends_on ['name' ]),
989
- bootstrap (AUTH = "auth" , ORCHESTRATION_FILE = "auth-aws" , VERSION = self .version , TOPOLOGY = "server" ),
999
+ bootstrap (AUTH = "auth" , ORCHESTRATION_FILE = "auth-aws" ,
1000
+ VERSION = self .version , TOPOLOGY = "server" ),
990
1001
func ('run aws tests' , TESTCASE = self .testcase .upper ())])
991
1002
992
1003
@property
@@ -1030,26 +1041,28 @@ def to_dict(self):
1030
1041
stapling = 'mustStaple-disableStapling'
1031
1042
1032
1043
orchestration_file = '%s-basic-tls-ocsp-%s' % (self .cert , stapling )
1033
- orchestration = bootstrap (VERSION = self .version , TOPOLOGY = 'server' , SSL = 'ssl' , OCSP = 'on' , ORCHESTRATION_FILE = orchestration_file )
1044
+ orchestration = bootstrap (VERSION = self .version , TOPOLOGY = 'server' ,
1045
+ SSL = 'ssl' , OCSP = 'on' , ORCHESTRATION_FILE = orchestration_file )
1034
1046
1035
1047
# The cache test expects a revoked response from an OCSP responder, exactly like TEST_4.
1036
1048
test_column = 'TEST_4' if self .test == 'cache' else self .test .upper ()
1037
1049
1038
1050
commands .append (shell_mongoc (
1039
1051
'TEST_COLUMN=%s CERT_TYPE=%s USE_DELEGATE=%s sh .evergreen/run-ocsp-responder.sh' % (
1040
- test_column , self .cert , 'on' if self .delegate == 'delegate' else 'off' )))
1052
+ test_column , self .cert , 'on' if self .delegate == 'delegate' else 'off' )))
1041
1053
commands .append (orchestration )
1042
1054
if self .depends_on ['name' ] == 'debug-compile-nosasl-openssl-1.0.1' :
1043
1055
# LD_LIBRARY_PATH is needed so the in-tree OpenSSL 1.0.1 is found at runtime
1044
1056
if self .test == 'cache' :
1045
1057
commands .append (shell_mongoc ('export LD_LIBRARY_PATH=$(pwd)/install-dir/lib\n '
1046
- 'CERT_TYPE=%s .evergreen/run-ocsp-cache-test.sh' % self .cert ))
1058
+ 'CERT_TYPE=%s .evergreen/run-ocsp-cache-test.sh' % self .cert ))
1047
1059
else :
1048
1060
commands .append (shell_mongoc ('export LD_LIBRARY_PATH=$(pwd)/install-dir/lib\n '
1049
- 'TEST_COLUMN=%s CERT_TYPE=%s sh .evergreen/run-ocsp-test.sh' % (self .test .upper (), self .cert )))
1061
+ 'TEST_COLUMN=%s CERT_TYPE=%s sh .evergreen/run-ocsp-test.sh' % (self .test .upper (), self .cert )))
1050
1062
else :
1051
1063
if self .test == 'cache' :
1052
- commands .append (shell_mongoc ('CERT_TYPE=%s .evergreen/run-ocsp-cache-test.sh' % self .cert ))
1064
+ commands .append (shell_mongoc (
1065
+ 'CERT_TYPE=%s .evergreen/run-ocsp-cache-test.sh' % self .cert ))
1053
1066
else :
1054
1067
commands .append (shell_mongoc (
1055
1068
'TEST_COLUMN=%s CERT_TYPE=%s sh .evergreen/run-ocsp-test.sh' % (self .test .upper (), self .cert )))
@@ -1076,26 +1089,30 @@ def _check_allowed(self):
1076
1089
1077
1090
all_tasks = chain (all_tasks , OCSPTask .matrix ())
1078
1091
1092
+
1079
1093
class LoadBalancedTask (MatrixTask ):
1080
1094
axes = OD ([
1081
1095
('asan' , [True ]),
1082
- ('build_ssl' , ['openssl' ]), # The SSL library the C driver is built with.
1083
- ('test_ssl' , [True , False ]), # Whether tests are run with SSL connections.
1096
+ # The SSL library the C driver is built with.
1097
+ ('build_ssl' , ['openssl' ]),
1098
+ # Whether tests are run with SSL connections.
1099
+ ('test_ssl' , [True , False ]),
1084
1100
('test_auth' , [True , False ]),
1085
1101
('version' , ['5.0' , 'latest' ])
1086
1102
])
1087
1103
1088
- def _check_allowed (self ):
1104
+ def _check_allowed (self ):
1089
1105
# Test with both SSL and auth, or neither.
1090
- prohibit (self .test_ssl != self .test_auth )
1106
+ prohibit (self .test_ssl != self .test_auth )
1091
1107
1092
1108
def __init__ (self , * args , ** kwargs ):
1093
1109
super (LoadBalancedTask , self ).__init__ (* args , ** kwargs )
1094
1110
if self .asan and self .build_ssl == "openssl" :
1095
- self .add_dependency ('debug-compile-asan-clang-openssl' )
1111
+ self .add_dependency ('debug-compile-asan-clang-openssl' )
1096
1112
self .add_tags ('test-asan' )
1097
1113
else :
1098
- raise RuntimeError ("unimplemented configuration for LoadBalancedTask" )
1114
+ raise RuntimeError (
1115
+ "unimplemented configuration for LoadBalancedTask" )
1099
1116
1100
1117
self .add_tags (self .version )
1101
1118
self .options ['exec_timeout_secs' ] = 3600
@@ -1125,22 +1142,22 @@ def to_dict(self):
1125
1142
commands .append (
1126
1143
func ('fetch build' , BUILD_NAME = self .depends_on ['name' ]))
1127
1144
1128
-
1129
1145
orchestration = bootstrap (TOPOLOGY = 'sharded_cluster' ,
1130
1146
AUTH = 'auth' if self .test_auth else 'noauth' ,
1131
1147
SSL = 'ssl' if self .test_ssl else 'nossl' ,
1132
1148
VERSION = self .version )
1133
1149
commands .append (orchestration )
1134
- commands .append (func ("clone drivers-evergreen-tools" ))
1135
- commands .append (func ("start load balancer" ,
1136
- MONGODB_URI = "mongodb://localhost:27017,localhost:27018" ))
1150
+ commands .append (func ("clone drivers-evergreen-tools" ))
1151
+ commands .append (func ("start load balancer" ,
1152
+ MONGODB_URI = "mongodb://localhost:27017,localhost:27018" ))
1137
1153
commands .append (run_tests (ASAN = 'on' if self .asan else 'off' ,
1138
1154
SSL = 'ssl' if self .test_ssl else 'nossl' ,
1139
1155
AUTH = 'auth' if self .test_auth else 'noauth' ,
1140
1156
LOADBALANCED = 'loadbalanced' ))
1141
1157
1142
1158
return task
1143
1159
1160
+
1144
1161
all_tasks = chain (all_tasks , LoadBalancedTask .matrix ())
1145
1162
1146
1163
all_tasks = list (all_tasks )
0 commit comments