Skip to content

Commit

Permalink
Fix os filter for arm
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Jan 24, 2025
1 parent 4403c7c commit d305a6d
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions tools/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -1472,18 +1472,15 @@ def upload_coverage(ctx: Context, reports_path: pathlib.Path, commit_sha: str =
ctx.exit(0)


def _os_test_filter(osdef, transport, chunk):
def _os_test_filter(osdef, transport, chunk, arm_runner):
"""
Filter out some test runs based on os, tranport and chunk to be run.
"""
if transport == "tcp" and chunk in ("unit", "functional"):
return False
if "macos" in osdef.slug and chunk == "scenarios":
return False
if osdef.arch == "arm64" and os.environ.get("LINUX_ARM_RUNNER", "0") not in (
"0",
"",
):
if not arm_runner:
return False
if transport == "tcp" and osdef.slug not in (
"rockylinux-9",
Expand Down Expand Up @@ -1737,7 +1734,9 @@ def workflow_config(
**_.as_dict(),
)
for _ in TEST_SALT_LISTING[platform]
if _os_test_filter(_, transport, chunk)
if _os_test_filter(
_, transport, chunk, config["linux_arm_runner"]
)
]
else:
for arch in ["x86_64", "arm64"]:
Expand All @@ -1754,7 +1753,12 @@ def workflow_config(
**_.as_dict(),
)
for _ in TEST_SALT_LISTING[platform]
if _os_test_filter(_, transport, chunk)
if _os_test_filter(
_,
transport,
chunk,
config["linux_arm_runner"],
)
and _.arch == arch
]
else:
Expand All @@ -1767,7 +1771,9 @@ def workflow_config(
**_.as_dict(),
)
for _ in TEST_SALT_LISTING[platform]
if _os_test_filter(_, transport, chunk)
if _os_test_filter(
_, transport, chunk, config["linux_arm_runner"]
)
]
else:
for arch in ["x86_64", "arm64"]:
Expand All @@ -1779,7 +1785,9 @@ def workflow_config(
**_.as_dict(),
)
for _ in TEST_SALT_LISTING[platform]
if _os_test_filter(_, transport, chunk)
if _os_test_filter(
_, transport, chunk, config["linux_arm_runner"]
)
and _.arch == arch
]

Expand Down

0 comments on commit d305a6d

Please sign in to comment.