Skip to content

Commit b46468f

Browse files
committed
Added python versions to generated test configs of test-numpy
1 parent 591d12e commit b46468f

File tree

4 files changed

+37
-6
lines changed

4 files changed

+37
-6
lines changed

.evergreen/generated_configs/functions.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ functions:
248248
- .evergreen/just.sh
249249
- test-numpy
250250
working_dir: src
251+
include_expansions_in_env:
252+
- TOOLCHAIN_VERSION
251253
type: test
252254

253255
# Upload coverage

.evergreen/generated_configs/tasks.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4769,9 +4769,23 @@ tasks:
47694769
- pypy
47704770

47714771
# Test numpy tests
4772-
- name: test-numpy
4772+
- name: test-numpy py3.10
47734773
commands:
47744774
- func: test numpy
4775+
vars:
4776+
TOOLCHAIN_VERSION: "3.10"
4777+
tags: [binary, vector]
4778+
- name: test-numpy py3.14
4779+
commands:
4780+
- func: test numpy
4781+
vars:
4782+
TOOLCHAIN_VERSION: "3.14"
4783+
tags: [binary, vector]
4784+
- name: test-numpy pypy3.11
4785+
commands:
4786+
- func: test numpy
4787+
vars:
4788+
TOOLCHAIN_VERSION: pypy3.11
47754789
tags: [binary, vector]
47764790

47774791
# Test standard auth tests

.evergreen/scripts/generate_config.py

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,10 +340,14 @@ def create_disable_test_commands_variants():
340340

341341

342342
def create_test_numpy_tasks():
343-
test_func = FunctionCall(func="test numpy")
344-
task_name = "test-numpy"
345-
tags = ["binary", "vector"]
346-
return [EvgTask(name=task_name, tags=tags, commands=[test_func])]
343+
tasks = []
344+
for python in [*MIN_MAX_PYTHON, PYPYS[-1]]:
345+
name = python if python.startswith("pypy") else f"py{python}"
346+
task_name = f"test-numpy {name}"
347+
test_func = FunctionCall(func="test numpy", vars=dict(TOOLCHAIN_VERSION=python))
348+
tags = ["binary", "vector"]
349+
tasks.append(EvgTask(name=task_name, tags=tags, commands=[test_func]))
350+
return tasks
347351

348352

349353
def create_test_numpy_variants() -> list[BuildVariant]:
@@ -1166,8 +1170,18 @@ def create_run_tests_func():
11661170
return "run tests", [setup_cmd, test_cmd]
11671171

11681172

1169-
def create_test_numpy_func():
1173+
def create_test_numpy_func_default():
1174+
"""No python version selection"""
11701175
test_cmd = get_subprocess_exec(args=[".evergreen/just.sh", "test-numpy"])
1176+
return "test numpy default", [test_cmd]
1177+
1178+
1179+
def create_test_numpy_func():
1180+
"""Adding TOOLCHAIN_VERSION to environment gets picked up in just.sh"""
1181+
includes = ["TOOLCHAIN_VERSION"]
1182+
test_cmd = get_subprocess_exec(
1183+
include_expansions_in_env=includes, args=[".evergreen/just.sh", "test-numpy"]
1184+
)
11711185
return "test numpy", [test_cmd]
11721186

11731187

justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ test *args="-v --durations=5 --maxfail=10": && resync
6262
[group('test')]
6363
test-numpy *args="-v --durations=5 --maxfail=10": && resync
6464
uv run --extra test --with numpy python -m pytest test/test_bson.py
65+
# TODO - Remove args from test-numpy
6566

6667
[group('test')]
6768
run-tests *args: && resync

0 commit comments

Comments
 (0)