Skip to content

Commit 4a4ca3a

Browse files
committed
PYTHON-4891 Use shrub.py for c extension tests
1 parent 7e83c8c commit 4a4ca3a

File tree

2 files changed

+114
-50
lines changed

2 files changed

+114
-50
lines changed

.evergreen/config.yml

Lines changed: 83 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,19 +2247,6 @@ axes:
22472247
variables:
22482248
MOD_WSGI_VERSION: "4"
22492249

2250-
# Install and use the driver's C-extensions?
2251-
- id: c-extensions
2252-
display_name: "C Extensions"
2253-
values:
2254-
- id: "without-c-extensions"
2255-
display_name: "Without C Extensions"
2256-
variables:
2257-
NO_EXT: "1"
2258-
- id: "with-c-extensions"
2259-
display_name: "With C Extensions"
2260-
variables:
2261-
NO_EXT: ""
2262-
22632250
# Choice of MongoDB storage engine
22642251
- id: storage-engine
22652252
display_name: Storage
@@ -3445,6 +3432,89 @@ buildvariants:
34453432
SSL: ssl
34463433
PYTHON_BINARY: /opt/python/3.12/bin/python3
34473434

3435+
# No C Ext tests.
3436+
- name: no-c-ext-rhel8-py3.9
3437+
tasks:
3438+
- name: .standalone
3439+
display_name: No C Ext RHEL8 py3.9
3440+
run_on:
3441+
- rhel87-small
3442+
expansions:
3443+
NO_EXT: "1"
3444+
PYTHON_BINARY: /opt/python/3.9/bin/python3
3445+
- name: no-c-ext-rhel8-py3.10
3446+
tasks:
3447+
- name: .replica_set
3448+
display_name: No C Ext RHEL8 py3.10
3449+
run_on:
3450+
- rhel87-small
3451+
expansions:
3452+
NO_EXT: "1"
3453+
PYTHON_BINARY: /opt/python/3.10/bin/python3
3454+
- name: no-c-ext-rhel8-py3.11
3455+
tasks:
3456+
- name: .sharded_cluster
3457+
display_name: No C Ext RHEL8 py3.11
3458+
run_on:
3459+
- rhel87-small
3460+
expansions:
3461+
NO_EXT: "1"
3462+
PYTHON_BINARY: /opt/python/3.11/bin/python3
3463+
- name: no-c-ext-rhel8-py3.12
3464+
tasks:
3465+
- name: .standalone
3466+
display_name: No C Ext RHEL8 py3.12
3467+
run_on:
3468+
- rhel87-small
3469+
expansions:
3470+
NO_EXT: "1"
3471+
PYTHON_BINARY: /opt/python/3.12/bin/python3
3472+
- name: no-c-ext-rhel8-py3.13
3473+
tasks:
3474+
- name: .replica_set
3475+
display_name: No C Ext RHEL8 py3.13
3476+
run_on:
3477+
- rhel87-small
3478+
expansions:
3479+
NO_EXT: "1"
3480+
PYTHON_BINARY: /opt/python/3.13/bin/python3
3481+
3482+
# Atlas Data Lake tests.
3483+
- name: atlas-data-lake-rhel8-py3.9-no-c
3484+
tasks:
3485+
- name: atlas-data-lake-tests
3486+
display_name: Atlas Data Lake RHEL8 py3.9 No C
3487+
run_on:
3488+
- rhel87-small
3489+
expansions:
3490+
NO_EXT: "1"
3491+
PYTHON_BINARY: /opt/python/3.9/bin/python3
3492+
- name: atlas-data-lake-rhel8-py3.9
3493+
tasks:
3494+
- name: atlas-data-lake-tests
3495+
display_name: Atlas Data Lake RHEL8 py3.9
3496+
run_on:
3497+
- rhel87-small
3498+
expansions:
3499+
PYTHON_BINARY: /opt/python/3.9/bin/python3
3500+
- name: atlas-data-lake-rhel8-py3.13-no-c
3501+
tasks:
3502+
- name: atlas-data-lake-tests
3503+
display_name: Atlas Data Lake RHEL8 py3.13 No C
3504+
run_on:
3505+
- rhel87-small
3506+
expansions:
3507+
NO_EXT: "1"
3508+
PYTHON_BINARY: /opt/python/3.13/bin/python3
3509+
- name: atlas-data-lake-rhel8-py3.13
3510+
tasks:
3511+
- name: atlas-data-lake-tests
3512+
display_name: Atlas Data Lake RHEL8 py3.13
3513+
run_on:
3514+
- rhel87-small
3515+
expansions:
3516+
PYTHON_BINARY: /opt/python/3.13/bin/python3
3517+
34483518
- matrix_name: "tests-fips"
34493519
matrix_spec:
34503520
platform:
@@ -3467,32 +3537,6 @@ buildvariants:
34673537
tasks:
34683538
- ".6.0"
34693539

3470-
- matrix_name: "tests-python-version-rhel8-without-c-extensions"
3471-
matrix_spec:
3472-
platform: rhel8
3473-
python-version: "*"
3474-
c-extensions: without-c-extensions
3475-
auth-ssl: noauth-nossl
3476-
coverage: "*"
3477-
exclude_spec:
3478-
# These interpreters are always tested without extensions.
3479-
- platform: rhel8
3480-
python-version: ["pypy3.9", "pypy3.10"]
3481-
c-extensions: "*"
3482-
auth-ssl: "*"
3483-
coverage: "*"
3484-
display_name: "${c-extensions} ${python-version} ${platform} ${auth} ${ssl} ${coverage}"
3485-
tasks: &all-server-versions
3486-
- ".rapid"
3487-
- ".latest"
3488-
- ".8.0"
3489-
- ".7.0"
3490-
- ".6.0"
3491-
- ".5.0"
3492-
- ".4.4"
3493-
- ".4.2"
3494-
- ".4.0"
3495-
34963540
- matrix_name: "tests-python-version-supports-openssl-102-test-ssl"
34973541
matrix_spec:
34983542
platform: rhel7
@@ -3613,16 +3657,6 @@ buildvariants:
36133657
tasks:
36143658
- "serverless_task_group"
36153659

3616-
- matrix_name: "data-lake-spec-tests"
3617-
matrix_spec:
3618-
platform: ubuntu-22.04
3619-
python-version: ["3.9", "3.10"]
3620-
auth: "auth"
3621-
c-extensions: "*"
3622-
display_name: "Atlas Data Lake ${python-version} ${c-extensions}"
3623-
tasks:
3624-
- name: atlas-data-lake-tests
3625-
36263660
# OCSP test matrix.
36273661
- name: ocsp-test-rhel8-v4.4-py3.9
36283662
tasks:

.evergreen/scripts/generate_config.py

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,10 +495,40 @@ def create_green_framework_variants():
495495
return variants
496496

497497

498+
def generate_no_c_ext_variants():
499+
variants = []
500+
host = "rhel8"
501+
for python, topology in zip_cycle(CPYTHONS, TOPOLOGIES):
502+
tasks = [f".{topology}"]
503+
expansions = dict()
504+
handle_c_ext(C_EXTS[0], expansions)
505+
display_name = get_display_name("No C Ext", host, python=python)
506+
variant = create_variant(
507+
tasks, display_name, host=host, python=python, expansions=expansions
508+
)
509+
variants.append(variant)
510+
return variants
511+
512+
513+
def generate_atlas_data_lake_variants():
514+
variants = []
515+
host = "rhel8"
516+
for python, c_ext in product(MIN_MAX_PYTHON, C_EXTS):
517+
tasks = ["atlas-data-lake-tests"]
518+
expansions = dict()
519+
handle_c_ext(c_ext, expansions)
520+
display_name = get_display_name("Atlas Data Lake", host, python=python, **expansions)
521+
variant = create_variant(
522+
tasks, display_name, host=host, python=python, expansions=expansions
523+
)
524+
variants.append(variant)
525+
return variants
526+
527+
498528
##################
499529
# Generate Config
500530
##################
501531

502-
variants = create_green_framework_variants()
532+
variants = generate_atlas_data_lake_variants()
503533
# print(len(variants))
504534
generate_yaml(variants=variants)

0 commit comments

Comments
 (0)