@@ -48,19 +48,11 @@ functions:
48
48
file : src/expansion.yml
49
49
50
50
" prepare resources " :
51
- - command : shell .exec
51
+ - command : subprocess .exec
52
52
params :
53
- script : |
54
- . src/.evergreen/scripts/env.sh
55
- set -o xtrace
56
- rm -rf $DRIVERS_TOOLS
57
- if [ "$PROJECT" = "drivers-tools" ]; then
58
- # If this was a patch build, doing a fresh clone would not actually test the patch
59
- cp -R ${PROJECT_DIRECTORY}/ ${DRIVERS_TOOLS}
60
- else
61
- git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git ${DRIVERS_TOOLS}
62
- fi
63
- echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config
53
+ binary : bash
54
+ args :
55
+ - src/.evergreen/scripts/prepare-resources.sh
64
56
65
57
" upload coverage" :
66
58
- command : ec2.assume_role
@@ -124,15 +116,12 @@ functions:
124
116
- command : ec2.assume_role
125
117
params :
126
118
role_arn : ${assume_role_arn}
127
- - command : shell .exec
119
+ - command : subprocess .exec
128
120
params :
129
- script : |
130
- . src/.evergreen/scripts/env.sh
131
- set -o xtrace
132
- mkdir out_dir
133
- find $MONGO_ORCHESTRATION_HOME -name \*.log -exec sh -c 'x="{}"; mv $x $PWD/out_dir/$(basename $(dirname $x))_$(basename $x)' \;
134
- tar zcvf mongodb-logs.tar.gz -C out_dir/ .
135
- rm -rf out_dir
121
+ binary : bash
122
+ args :
123
+ - src/.evergreen/scripts/archive-mongodb-logs.sh
124
+
136
125
- command : archive.targz_pack
137
126
params :
138
127
target : " mongo-coredumps.tgz"
@@ -226,54 +215,11 @@ functions:
226
215
file : " src/xunit-results/TEST-*.xml"
227
216
228
217
" bootstrap mongo-orchestration " :
229
- - command : shell .exec
218
+ - command : subprocess .exec
230
219
params :
231
- script : |
232
- . src/.evergreen/scripts/env.sh
233
- set -o xtrace
234
-
235
- # Enable core dumps if enabled on the machine
236
- # Copied from https://github.com/mongodb/mongo/blob/master/etc/evergreen.yml
237
- if [ -f /proc/self/coredump_filter ]; then
238
- # Set the shell process (and its children processes) to dump ELF headers (bit 4),
239
- # anonymous shared mappings (bit 1), and anonymous private mappings (bit 0).
240
- echo 0x13 > /proc/self/coredump_filter
241
-
242
- if [ -f /sbin/sysctl ]; then
243
- # Check that the core pattern is set explicitly on our distro image instead
244
- # of being the OS's default value. This ensures that coredump names are consistent
245
- # across distros and can be picked up by Evergreen.
246
- core_pattern=$(/sbin/sysctl -n "kernel.core_pattern")
247
- if [ "$core_pattern" = "dump_%e.%p.core" ]; then
248
- echo "Enabling coredumps"
249
- ulimit -c unlimited
250
- fi
251
- fi
252
- fi
253
-
254
- if [ $(uname -s) = "Darwin" ]; then
255
- core_pattern_mac=$(/usr/sbin/sysctl -n "kern.corefile")
256
- if [ "$core_pattern_mac" = "dump_%N.%P.core" ]; then
257
- echo "Enabling coredumps"
258
- ulimit -c unlimited
259
- fi
260
- fi
261
-
262
- if [ -n "${skip_crypt_shared}" ]; then
263
- export SKIP_CRYPT_SHARED=1
264
- fi
265
-
266
- MONGODB_VERSION=${VERSION} \
267
- TOPOLOGY=${TOPOLOGY} \
268
- AUTH=${AUTH} \
269
- SSL=${SSL} \
270
- STORAGE_ENGINE=${STORAGE_ENGINE} \
271
- DISABLE_TEST_COMMANDS=${DISABLE_TEST_COMMANDS} \
272
- ORCHESTRATION_FILE=${ORCHESTRATION_FILE} \
273
- REQUIRE_API_VERSION=${REQUIRE_API_VERSION} \
274
- LOAD_BALANCER=${LOAD_BALANCER} \
275
- bash ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh
276
- # run-orchestration generates expansion file with the MONGODB_URI for the cluster
220
+ binary : bash
221
+ args :
222
+ - src/.evergreen/scripts/bootstrap-mongo-orchestration.sh
277
223
- command : expansions.update
278
224
params :
279
225
file : mo-expansion.yml
@@ -284,28 +230,25 @@ functions:
284
230
value : " 1"
285
231
286
232
" bootstrap data lake " :
287
- - command : shell .exec
233
+ - command : subprocess .exec
288
234
type : setup
289
235
params :
290
- script : |
291
- . src/.evergreen/scripts/env.sh
292
- bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/pull-mongohouse-image.sh
293
- - command : shell .exec
236
+ binary : bash
237
+ args :
238
+ - ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/pull-mongohouse-image.sh
239
+ - command : subprocess .exec
294
240
type : setup
295
241
params :
296
- script : |
297
- . src/.evergreen/scripts/env.sh
298
- bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/run-mongohouse-image.sh
299
- sleep 1
300
- docker ps
242
+ binary : bash
243
+ args :
244
+ - ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/run-mongohouse-image.sh
301
245
302
246
" stop mongo-orchestration " :
303
- - command : shell .exec
247
+ - command : subprocess .exec
304
248
params :
305
- script : |
306
- . src/.evergreen/scripts/env.sh
307
- set -o xtrace
308
- bash ${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
249
+ binary : bash
250
+ args :
251
+ - ${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
309
252
310
253
" run mod_wsgi tests " :
311
254
- command : shell.exec
@@ -341,76 +284,14 @@ functions:
341
284
PYTHON_BINARY=${PYTHON_BINARY} bash ${PROJECT_DIRECTORY}/.evergreen/hatch.sh doctest:test
342
285
343
286
" run tests " :
344
- - command : shell.exec
345
- params :
346
- working_dir : " src"
347
- shell : bash
348
- background : true
349
- include_expansions_in_env : ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
350
- script : |
351
- . .evergreen/scripts/env.sh
352
- if [ -n "${test_encryption}" ]; then
353
- ./.evergreen/hatch.sh encryption:setup
354
- fi
355
- - command : shell.exec
287
+ - command : subprocess.exec
356
288
type : test
357
289
params :
290
+ include_expansions_in_env : ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
358
291
working_dir : " src"
359
- shell : bash
360
- script : |
361
- # Disable xtrace
362
- set +x
363
- . .evergreen/scripts/env.sh
364
- if [ -n "${MONGODB_STARTED}" ]; then
365
- export PYMONGO_MUST_CONNECT=true
366
- fi
367
- if [ -n "${DISABLE_TEST_COMMANDS}" ]; then
368
- export PYMONGO_DISABLE_TEST_COMMANDS=1
369
- fi
370
- if [ -n "${test_encryption}" ]; then
371
- # Disable xtrace (just in case it was accidentally set).
372
- set +x
373
- bash ${DRIVERS_TOOLS}/.evergreen/csfle/await-servers.sh
374
- export TEST_ENCRYPTION=1
375
- if [ -n "${test_encryption_pyopenssl}" ]; then
376
- export TEST_ENCRYPTION_PYOPENSSL=1
377
- fi
378
- fi
379
- if [ -n "${test_crypt_shared}" ]; then
380
- export TEST_CRYPT_SHARED=1
381
- export CRYPT_SHARED_LIB_PATH=${CRYPT_SHARED_LIB_PATH}
382
- fi
383
- if [ -n "${test_pyopenssl}" ]; then
384
- export TEST_PYOPENSSL=1
385
- fi
386
- if [ -n "${SETDEFAULTENCODING}" ]; then
387
- export SETDEFAULTENCODING="${SETDEFAULTENCODING}"
388
- fi
389
- if [ -n "${test_loadbalancer}" ]; then
390
- export TEST_LOADBALANCER=1
391
- export SINGLE_MONGOS_LB_URI="${SINGLE_MONGOS_LB_URI}"
392
- export MULTI_MONGOS_LB_URI="${MULTI_MONGOS_LB_URI}"
393
- fi
394
- if [ -n "${test_serverless}" ]; then
395
- export TEST_SERVERLESS=1
396
- fi
397
- if [ -n "${TEST_INDEX_MANAGEMENT}" ]; then
398
- export TEST_INDEX_MANAGEMENT=1
399
- fi
400
- if [ -n "${SKIP_CSOT_TESTS}" ]; then
401
- export SKIP_CSOT_TESTS=1
402
- fi
403
-
404
- GREEN_FRAMEWORK=${GREEN_FRAMEWORK} \
405
- PYTHON_BINARY=${PYTHON_BINARY} \
406
- NO_EXT=${NO_EXT} \
407
- COVERAGE=${COVERAGE} \
408
- COMPRESSORS=${COMPRESSORS} \
409
- AUTH=${AUTH} \
410
- SSL=${SSL} \
411
- TEST_DATA_LAKE=${TEST_DATA_LAKE} \
412
- MONGODB_API_VERSION=${MONGODB_API_VERSION} \
413
- bash ${PROJECT_DIRECTORY}/.evergreen/hatch.sh test:test-eg
292
+ binary : bash
293
+ args :
294
+ - .evergreen/scripts/run-tests.sh
414
295
415
296
" run enterprise auth tests " :
416
297
- command : shell.exec
@@ -535,25 +416,13 @@ functions:
535
416
.evergreen/run-mongodb-aws-test.sh session-creds
536
417
537
418
" run aws ECS auth test " :
538
- - command : shell .exec
419
+ - command : subprocess .exec
539
420
type : test
540
421
params :
541
- shell : " bash"
422
+ binary : " bash"
542
423
working_dir : " src"
543
- script : |
544
- if [ "${skip_ECS_auth_test}" = "true" ]; then
545
- echo "This platform does not support the ECS auth test, skipping..."
546
- exit 0
547
- fi
548
- . .evergreen/scripts/env.sh
549
- set -ex
550
- cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
551
- . ./activate-authawsvenv.sh
552
- . aws_setup.sh ecs
553
- export MONGODB_BINARIES="$MONGODB_BINARIES";
554
- export PROJECT_DIRECTORY="${PROJECT_DIRECTORY}";
555
- python aws_tester.py ecs
556
- cd -
424
+ args :
425
+ - .evergreen/scripts/run-aws-ecs-auth-test.sh
557
426
558
427
" cleanup " :
559
428
- command : shell.exec
@@ -568,54 +437,33 @@ functions:
568
437
" fix absolute paths " :
569
438
- command : shell.exec
570
439
params :
571
- script : |
572
- set +x
573
- . src/.evergreen/scripts/env.sh
574
- for filename in $(find ${DRIVERS_TOOLS} -name \*.json); do
575
- perl -p -i -e "s|ABSOLUTE_PATH_REPLACEMENT_TOKEN|${DRIVERS_TOOLS}|g" $filename
576
- done
440
+ args :
441
+ - src/.evergreen/scripts/fix-absolute-paths.sh
577
442
578
443
" windows fix " :
579
- - command : shell .exec
444
+ - command : subprocess .exec
580
445
params :
581
- script : |
582
- set +x
583
- . src/.evergreen/scripts/env.sh
584
- for i in $(find ${DRIVERS_TOOLS}/.evergreen ${PROJECT_DIRECTORY}/.evergreen -name \*.sh); do
585
- cat $i | tr -d '\r' > $i.new
586
- mv $i.new $i
587
- done
588
- # Copy client certificate because symlinks do not work on Windows.
589
- cp ${DRIVERS_TOOLS}/.evergreen/x509gen/client.pem $MONGO_ORCHESTRATION_HOME/lib/client.pem
446
+ args :
447
+ - src/.evergreen/scripts/windows-fix.sh
590
448
591
449
" make files executable " :
592
- - command : shell .exec
450
+ - command : subprocess .exec
593
451
params :
594
- script : |
595
- set +x
596
- . src/.evergreen/scripts/env.sh
597
- for i in $(find ${DRIVERS_TOOLS}/.evergreen ${PROJECT_DIRECTORY}/.evergreen -name \*.sh); do
598
- chmod +x $i
599
- done
452
+ args :
453
+ - src/.evergreen/scripts/make-files-executable.sh
600
454
601
455
" init test-results " :
602
- - command : shell .exec
456
+ - command : subprocess .exec
603
457
params :
604
- script : |
605
- set +x
606
- . src/.evergreen/scripts/env.sh
607
- echo '{"results": [{ "status": "FAIL", "test_file": "Build", "log_raw": "No test-results.json found was created" } ]}' > ${PROJECT_DIRECTORY}/test-results.json
458
+ args :
459
+ - src/.evergreen/scripts/init-test-results.sh
608
460
609
461
" install dependencies " :
610
- - command : shell .exec
462
+ - command : subprocess .exec
611
463
params :
612
464
working_dir : " src"
613
- script : |
614
- . .evergreen/scripts/env.sh
615
- set -o xtrace
616
- file="${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh"
617
- # Don't use ${file} syntax here because evergreen treats it as an empty expansion.
618
- [ -f "$file" ] && bash $file || echo "$file not available, skipping"
465
+ args :
466
+ - .evergreen/scripts/install-dependencies.sh
619
467
620
468
" assume ec2 role " :
621
469
- command : ec2.assume_role
0 commit comments