|
26 | 26 | BATCHTIME_WEEK = 10080
|
27 | 27 | AUTH_SSLS = [("auth", "ssl"), ("noauth", "ssl"), ("noauth", "nossl")]
|
28 | 28 | TOPOLOGIES = ["standalone", "replica_set", "sharded_cluster"]
|
29 |
| -C_EXTS = ["with_ext", "without_ext"] |
| 29 | +C_EXTS = ["without_ext", "with_ext"] |
30 | 30 | # By default test each of the topologies with a subset of auth/ssl.
|
31 | 31 | SUB_TASKS = [
|
32 | 32 | ".sharded_cluster .auth .ssl",
|
@@ -217,7 +217,7 @@ def get_variant_name(base: str, host: Host | None = None, **kwargs) -> str:
|
217 | 217 |
|
218 | 218 |
|
219 | 219 | def get_task_name(base: str, **kwargs):
|
220 |
| - return get_common_name(base, "-", **kwargs).lower() |
| 220 | + return get_common_name(base, "-", **kwargs).replace(" ", "-").lower() |
221 | 221 |
|
222 | 222 |
|
223 | 223 | def zip_cycle(*iterables, empty_default=None):
|
@@ -430,42 +430,22 @@ def create_load_balancer_variants():
|
430 | 430 |
|
431 | 431 |
|
432 | 432 | def create_compression_variants():
|
433 |
| - # Compression tests - standalone versions of each server, across python versions, with and without c extensions. |
434 |
| - # PyPy interpreters are always tested without extensions. |
| 433 | + # Compression tests - standalone versions of each server, across python versions. |
435 | 434 | host = DEFAULT_HOST
|
436 |
| - base_task = ".standalone .noauth .nossl .sync_async" |
437 |
| - task_names = dict(snappy=[base_task], zlib=[base_task], zstd=[f"{base_task} !.4.0"]) |
| 435 | + base_task = ".compression" |
438 | 436 | variants = []
|
439 |
| - for ind, (compressor, c_ext) in enumerate(product(["snappy", "zlib", "zstd"], C_EXTS)): |
440 |
| - expansions = dict(COMPRESSORS=compressor) |
441 |
| - handle_c_ext(c_ext, expansions) |
442 |
| - base_name = f"Compression {compressor}" |
443 |
| - python = CPYTHONS[ind % len(CPYTHONS)] |
444 |
| - display_name = get_variant_name(base_name, host, python=python, **expansions) |
445 |
| - variant = create_variant( |
446 |
| - task_names[compressor], |
447 |
| - display_name, |
448 |
| - python=python, |
449 |
| - host=host, |
450 |
| - expansions=expansions, |
451 |
| - ) |
452 |
| - variants.append(variant) |
453 |
| - |
454 |
| - other_pythons = PYPYS + CPYTHONS[ind:] |
455 |
| - for compressor, python in zip_cycle(["snappy", "zlib", "zstd"], other_pythons): |
456 |
| - expansions = dict(COMPRESSORS=compressor) |
457 |
| - handle_c_ext(c_ext, expansions) |
458 |
| - base_name = f"Compression {compressor}" |
459 |
| - display_name = get_variant_name(base_name, host, python=python, **expansions) |
460 |
| - variant = create_variant( |
461 |
| - task_names[compressor], |
462 |
| - display_name, |
463 |
| - python=python, |
464 |
| - host=host, |
465 |
| - expansions=expansions, |
| 437 | + for compressor in "snappy", "zlib", "zstd": |
| 438 | + expansions = dict(COMPRESSOR=compressor) |
| 439 | + tasks = [base_task] if compressor != "zstd" else [f"{base_task} !.4.0"] |
| 440 | + display_name = get_variant_name(f"Compression {compressor}", host) |
| 441 | + variants.append( |
| 442 | + create_variant( |
| 443 | + tasks, |
| 444 | + display_name, |
| 445 | + host=host, |
| 446 | + expansions=expansions, |
| 447 | + ) |
466 | 448 | )
|
467 |
| - variants.append(variant) |
468 |
| - |
469 | 449 | return variants
|
470 | 450 |
|
471 | 451 |
|
@@ -866,6 +846,39 @@ def create_load_balancer_tasks():
|
866 | 846 | return tasks
|
867 | 847 |
|
868 | 848 |
|
| 849 | +def create_compression_tasks(): |
| 850 | + tasks = [] |
| 851 | + versions = get_versions_from("4.0") |
| 852 | + # Test all server versions with min python. |
| 853 | + for version in versions: |
| 854 | + python = CPYTHONS[0] |
| 855 | + tags = ["compression", version] |
| 856 | + name = get_task_name("test-compression", python=python, version=version) |
| 857 | + server_func = FunctionCall(func="run server", vars=dict(VERSION=version)) |
| 858 | + test_func = FunctionCall(func="run tests") |
| 859 | + tasks.append(EvgTask(name=name, tags=tags, commands=[server_func, test_func])) |
| 860 | + |
| 861 | + # Test latest with max python, with and without c exts. |
| 862 | + version = "latest" |
| 863 | + tags = ["compression", "latest"] |
| 864 | + for c_ext in C_EXTS: |
| 865 | + python = CPYTHONS[-1] |
| 866 | + expansions = dict() |
| 867 | + handle_c_ext(c_ext, expansions) |
| 868 | + name = get_task_name("test-compression", python=python, version=version, **expansions) |
| 869 | + server_func = FunctionCall(func="run server", vars=dict(VERSION=version)) |
| 870 | + test_func = FunctionCall(func="run tests", vars=expansions) |
| 871 | + tasks.append(EvgTask(name=name, tags=tags, commands=[server_func, test_func])) |
| 872 | + |
| 873 | + # Test on latest with pypy. |
| 874 | + python = PYPYS[-1] |
| 875 | + name = get_task_name("test-compression", python=python, version=version) |
| 876 | + server_func = FunctionCall(func="run server", vars=dict(VERSION=version)) |
| 877 | + test_func = FunctionCall(func="run tests") |
| 878 | + tasks.append(EvgTask(name=name, tags=tags, commands=[server_func, test_func])) |
| 879 | + return tasks |
| 880 | + |
| 881 | + |
869 | 882 | def create_kms_tasks():
|
870 | 883 | tasks = []
|
871 | 884 | for kms_type in ["gcp", "azure"]:
|
|
0 commit comments