Skip to content

Commit 1ae0c39

Browse files
authored
PYTHON-4886 Use shrub.py for PyOpenSSL tests (#1946)
1 parent 6a7e83d commit 1ae0c39

File tree

2 files changed

+126
-52
lines changed

2 files changed

+126
-52
lines changed

.evergreen/config.yml

Lines changed: 93 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,16 +2305,6 @@ axes:
23052305
variables:
23062306
COVERAGE: "coverage"
23072307

2308-
# Run pyopenssl tests?
2309-
- id: pyopenssl
2310-
display_name: "PyOpenSSL"
2311-
values:
2312-
- id: "enabled"
2313-
display_name: "PyOpenSSL"
2314-
variables:
2315-
test_pyopenssl: true
2316-
batchtime: 10080 # 7 days
2317-
23182308
- id: versionedApi
23192309
display_name: "versionedApi"
23202310
values:
@@ -3283,6 +3273,99 @@ buildvariants:
32833273
AUTH: auth
32843274
PYTHON_BINARY: /opt/python/pypy3.10/bin/python3
32853275

3276+
# PyOpenSSL tests.
3277+
- name: pyopenssl-macos-py3.9
3278+
tasks:
3279+
- name: .replica_set
3280+
- name: .7.0
3281+
display_name: PyOpenSSL macOS py3.9
3282+
run_on:
3283+
- macos-14
3284+
batchtime: 10080
3285+
expansions:
3286+
AUTH: noauth
3287+
test_pyopenssl: "true"
3288+
SSL: ssl
3289+
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3
3290+
- name: pyopenssl-rhel8-py3.10
3291+
tasks:
3292+
- name: .replica_set
3293+
- name: .7.0
3294+
display_name: PyOpenSSL RHEL8 py3.10
3295+
run_on:
3296+
- rhel87-small
3297+
batchtime: 10080
3298+
expansions:
3299+
AUTH: auth
3300+
test_pyopenssl: "true"
3301+
SSL: ssl
3302+
PYTHON_BINARY: /opt/python/3.10/bin/python3
3303+
- name: pyopenssl-rhel8-py3.11
3304+
tasks:
3305+
- name: .replica_set
3306+
- name: .7.0
3307+
display_name: PyOpenSSL RHEL8 py3.11
3308+
run_on:
3309+
- rhel87-small
3310+
batchtime: 10080
3311+
expansions:
3312+
AUTH: auth
3313+
test_pyopenssl: "true"
3314+
SSL: ssl
3315+
PYTHON_BINARY: /opt/python/3.11/bin/python3
3316+
- name: pyopenssl-rhel8-py3.12
3317+
tasks:
3318+
- name: .replica_set
3319+
- name: .7.0
3320+
display_name: PyOpenSSL RHEL8 py3.12
3321+
run_on:
3322+
- rhel87-small
3323+
batchtime: 10080
3324+
expansions:
3325+
AUTH: auth
3326+
test_pyopenssl: "true"
3327+
SSL: ssl
3328+
PYTHON_BINARY: /opt/python/3.12/bin/python3
3329+
- name: pyopenssl-win64-py3.13
3330+
tasks:
3331+
- name: .replica_set
3332+
- name: .7.0
3333+
display_name: PyOpenSSL Win64 py3.13
3334+
run_on:
3335+
- windows-64-vsMulti-small
3336+
batchtime: 10080
3337+
expansions:
3338+
AUTH: auth
3339+
test_pyopenssl: "true"
3340+
SSL: ssl
3341+
PYTHON_BINARY: C:/python/Python313/python.exe
3342+
- name: pyopenssl-rhel8-pypy3.9
3343+
tasks:
3344+
- name: .replica_set
3345+
- name: .7.0
3346+
display_name: PyOpenSSL RHEL8 pypy3.9
3347+
run_on:
3348+
- rhel87-small
3349+
batchtime: 10080
3350+
expansions:
3351+
AUTH: auth
3352+
test_pyopenssl: "true"
3353+
SSL: ssl
3354+
PYTHON_BINARY: /opt/python/pypy3.9/bin/python3
3355+
- name: pyopenssl-rhel8-pypy3.10
3356+
tasks:
3357+
- name: .replica_set
3358+
- name: .7.0
3359+
display_name: PyOpenSSL RHEL8 pypy3.10
3360+
run_on:
3361+
- rhel87-small
3362+
batchtime: 10080
3363+
expansions:
3364+
AUTH: auth
3365+
test_pyopenssl: "true"
3366+
SSL: ssl
3367+
PYTHON_BINARY: /opt/python/pypy3.10/bin/python3
3368+
32863369
- matrix_name: "tests-fips"
32873370
matrix_spec:
32883371
platform:
@@ -3305,47 +3388,6 @@ buildvariants:
33053388
tasks:
33063389
- ".6.0"
33073390

3308-
- matrix_name: "tests-pyopenssl"
3309-
matrix_spec:
3310-
platform: rhel8
3311-
python-version: "*"
3312-
auth: "*"
3313-
ssl: "ssl"
3314-
pyopenssl: "*"
3315-
# Only test "noauth" with Python 3.9.
3316-
exclude_spec:
3317-
platform: rhel8
3318-
python-version: ["3.10", "3.11", "3.12", "3.13", "pypy3.9", "pypy3.10"]
3319-
auth: "noauth"
3320-
ssl: "ssl"
3321-
pyopenssl: "*"
3322-
display_name: "PyOpenSSL ${platform} ${python-version} ${auth}"
3323-
tasks:
3324-
- '.replica_set'
3325-
# Test standalone and sharded only on 7.0.
3326-
- '.7.0'
3327-
3328-
- matrix_name: "tests-pyopenssl-macOS"
3329-
matrix_spec:
3330-
platform: macos
3331-
auth: "auth"
3332-
ssl: "ssl"
3333-
pyopenssl: "*"
3334-
display_name: "PyOpenSSL ${platform} ${auth}"
3335-
tasks:
3336-
- '.replica_set'
3337-
3338-
- matrix_name: "tests-pyopenssl-windows"
3339-
matrix_spec:
3340-
platform: windows
3341-
python-version-windows: "*"
3342-
auth: "auth"
3343-
ssl: "ssl"
3344-
pyopenssl: "*"
3345-
display_name: "PyOpenSSL ${platform} ${python-version-windows} ${auth}"
3346-
tasks:
3347-
- '.replica_set'
3348-
33493391
- matrix_name: "tests-python-version-rhel8-without-c-extensions"
33503392
matrix_spec:
33513393
platform: rhel8

.evergreen/scripts/generate_config.py

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,42 @@ def create_enterprise_auth_variants():
410410
return variants
411411

412412

413+
def create_pyopenssl_variants():
414+
base_name = "PyOpenSSL"
415+
batchtime = BATCHTIME_WEEK
416+
base_expansions = dict(test_pyopenssl="true", SSL="ssl")
417+
variants = []
418+
419+
for python in ALL_PYTHONS:
420+
# Only test "noauth" with min python.
421+
auth = "noauth" if python == CPYTHONS[0] else "auth"
422+
if python == CPYTHONS[0]:
423+
host = "macos"
424+
elif python == CPYTHONS[-1]:
425+
host = "win64"
426+
else:
427+
host = "rhel8"
428+
expansions = dict(AUTH=auth)
429+
expansions.update(base_expansions)
430+
431+
display_name = get_display_name(base_name, host, python=python)
432+
variant = create_variant(
433+
[".replica_set", ".7.0"],
434+
display_name,
435+
python=python,
436+
host=host,
437+
expansions=expansions,
438+
batchtime=batchtime,
439+
)
440+
variants.append(variant)
441+
442+
return variants
443+
444+
413445
##################
414446
# Generate Config
415447
##################
416448

417-
variants = create_server_variants()
449+
variants = create_pyopenssl_variants()
418450
# print(len(variants))
419451
generate_yaml(variants=variants)

0 commit comments

Comments
 (0)