Skip to content

Commit b8d9719

Browse files
committed
Checkpoint - working on numpy test variants
1 parent 9420ec1 commit b8d9719

File tree

4 files changed

+90
-0
lines changed

4 files changed

+90
-0
lines changed

.evergreen/generated_configs/tasks.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4768,6 +4768,14 @@ tasks:
47684768
- noauth
47694769
- pypy
47704770

4771+
# Test numpy tests
4772+
- name: test-numpy
4773+
commands:
4774+
- func: run test numpy
4775+
vars:
4776+
TEST_NAME: test_numpy
4777+
tags: [binary, vector]
4778+
47714779
# Test standard auth tests
47724780
- name: test-standard-auth-v4.2-python3.10-auth-ssl-sharded-cluster
47734781
commands:

.evergreen/generated_configs/variants.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,3 +612,46 @@ buildvariants:
612612
- rhel87-small
613613
expansions:
614614
STORAGE_ENGINE: inmemory
615+
616+
# Test numpy tests
617+
- name: test-numpy-rhel8
618+
tasks:
619+
- name: .test-numpy
620+
display_name: Test Numpy RHEL8
621+
run_on:
622+
- rhel87-small
623+
tags: [binary-vector]
624+
- name: test-numpy-macos
625+
tasks:
626+
- name: .test-numpy
627+
display_name: Test Numpy macOS
628+
run_on:
629+
- macos-14
630+
tags: [binary-vector]
631+
- name: test-numpy-macos-arm64
632+
tasks:
633+
- name: .test-numpy !.pypy .server-6.0
634+
- name: .test-numpy !.pypy .server-7.0
635+
- name: .test-numpy !.pypy .server-8.0
636+
- name: .test-numpy !.pypy .server-rapid
637+
- name: .test-numpy !.pypy .server-latest
638+
display_name: Test Numpy macOS Arm64
639+
run_on:
640+
- macos-14-arm64
641+
tags: [binary-vector]
642+
- name: test-numpy-win64
643+
tasks:
644+
- name: .test-numpy
645+
display_name: Test Numpy Win64
646+
run_on:
647+
- windows-64-vsMulti-small
648+
tags: [binary-vector]
649+
- name: test-numpy-win32
650+
tasks:
651+
- name: .test-numpy
652+
display_name: Test Numpy Win32
653+
run_on:
654+
- windows-64-vsMulti-small
655+
expansions:
656+
IS_WIN32: "1"
657+
tags: [binary-vector]

.evergreen/scripts/generate_config.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,38 @@ def create_disable_test_commands_variants():
323323
return [create_variant(tasks, display_name, host=host, expansions=expansions)]
324324

325325

326+
def create_test_numpy_tasks():
327+
vars = dict(TEST_NAME="test_numpy")
328+
test_func = FunctionCall(func="run test numpy", vars=vars)
329+
task_name = "test-numpy"
330+
tags = ["binary", "vector"]
331+
return [EvgTask(name=task_name, tags=tags, commands=[test_func])]
332+
333+
334+
def create_test_numpy_variants() -> list[BuildVariant]:
335+
variants = []
336+
base_display_name = "Test Numpy"
337+
338+
# Test a subset on each of the other platforms.
339+
for host_name in ("rhel8", "macos", "macos-arm64", "win64", "win32"):
340+
tasks = [".test-numpy"]
341+
# MacOS arm64 only works on server versions 6.0+
342+
if host_name == "macos-arm64":
343+
tasks = [
344+
f".test-numpy !.pypy .server-{version}" for version in get_versions_from("6.0")
345+
]
346+
host = HOSTS[host_name]
347+
tags = ["binary-vector"]
348+
expansions = dict()
349+
if host_name == "win32":
350+
expansions["IS_WIN32"] = "1"
351+
display_name = get_variant_name(base_display_name, host)
352+
variant = create_variant(tasks, display_name, host=host, tags=tags, expansions=expansions)
353+
variants.append(variant)
354+
355+
return variants
356+
357+
326358
def create_oidc_auth_variants():
327359
variants = []
328360
for host_name in ["ubuntu22", "macos", "win64"]:
@@ -1174,3 +1206,6 @@ def create_send_dashboard_data_func():
11741206
write_variants_to_file(mod)
11751207
write_tasks_to_file(mod)
11761208
write_functions_to_file(mod)
1209+
1210+
# TODO - Create a new variant here that drives run-test
1211+
# Workfromrove

.evergreen/scripts/run_tests.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,7 @@ def run() -> None:
214214

215215
if __name__ == "__main__":
216216
run()
217+
218+
219+
# TODO - Make changes here to create a pytest marker that runs as desired
220+
# Use encryption as example

0 commit comments

Comments
 (0)