Skip to content

Commit 76fed2f

Browse files
committed
Fix macOS CI job processing in scripts and tests
Update ci-e2e-bundle.py to include e2e-macos in MATRIX_JOBS so macOS test binaries are bundled. Update ci-vlt-proof-suites.py and all test scripts (test_ci_vlt_rows.py, test_ci_e2e_tiers.py, test_vlt_coverage.py) to read from the new macOS-specific jobs (e2e-macos, cargo-vex-matrix-macos, install-proof-macos) alongside the original jobs.
1 parent d31250a commit 76fed2f

5 files changed

Lines changed: 23 additions & 15 deletions

File tree

‎scripts/ci-e2e-bundle.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
ROOT = Path(__file__).resolve().parents[1]
3030
CI = ROOT / ".github" / "workflows" / "ci.yml"
3131
TESTS = ROOT / "crates" / "socket-patch-cli" / "tests"
32-
MATRIX_JOBS = ("e2e", "e2e-full")
32+
MATRIX_JOBS = ("e2e", "e2e-full", "e2e-macos")
3333
# The binaries cargo-vex-matrix and cargo-vex-matrix-full run on every OS.
3434
CARGO_VEX_SUITES = (
3535
"e2e_redirect_cargo_build",

‎scripts/ci-vlt-proof-suites.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ def proof_upgrade(vlt, node):
3939

4040
def ci_cells(text=None):
4141
reader = load_reader()
42-
rows = reader.matrix_include(reader.jobs(text if text is not None else CI.read_text(encoding="utf-8"))["e2e"])
42+
jobs = reader.jobs(text if text is not None else CI.read_text(encoding="utf-8"))
43+
rows = reader.matrix_include(jobs["e2e"]) + reader.matrix_include(jobs["e2e-macos"])
4344
return {(r["suite"], r["os"], r["vlt"], r.get("vlt_store_linker", ""), r.get("vlt_upgrade", ""))
4445
for r in rows if r.get("vlt") and r.get("test_filter") == "--include-ignored vlt_pinned_matrix"}
4546

‎scripts/tests/test_ci_e2e_tiers.py‎

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Tiers(unittest.TestCase):
4242
def test_every_row_is_a_test_target(self):
4343
# `suite` may list several binaries; an `allow_empty` row may name
4444
# suites that have not landed yet (test_ci_gradle_prefixes.py).
45-
for job in ("e2e", "e2e-full"):
45+
for job in ("e2e", "e2e-full", "e2e-macos"):
4646
for row in rows(job):
4747
for suite in bundle.row_suites(row):
4848
with self.subTest(job=job, row=row, suite=suite):
@@ -78,15 +78,16 @@ def test_nightly_schedule_runs_the_full_tier(self):
7878

7979
def test_cargo_cross_is_split_exactly(self):
8080
pr = [(r["os"], r["toolchain"], r.get("lock", "")) for r in rows("cargo-vex-matrix")]
81+
macos = [(r["os"], r["toolchain"], r.get("lock", "")) for r in rows("cargo-vex-matrix-macos")]
8182
full = [(r["os"], r["toolchain"], r.get("lock", "")) for r in rows("cargo-vex-matrix-full")]
8283
want = {("ubuntu-latest", t, l) for t, l in itertools.product(("1.82.0", "1.93.1", "stable"),
8384
("", "1", "2", "3", "4"))}
8485
want |= {("macos-latest", "stable", "1"), ("windows-latest", "stable", "1"),
8586
("macos-latest", "1.93.1", ""), ("windows-latest", "1.93.1", "")}
86-
self.assertEqual(len(pr + full), len(want))
87-
self.assertEqual(set(pr) | set(full), want)
87+
self.assertEqual(len(pr + macos + full), len(want))
88+
self.assertEqual(set(pr) | set(macos) | set(full), want)
8889
for os_name in ("ubuntu-latest", "macos-latest", "windows-latest"):
89-
self.assertIn((os_name, "1.93.1", ""), pr, "the pinned toolchain's own lock on every OS")
90+
self.assertIn((os_name, "1.93.1", ""), pr + macos, "the pinned toolchain's own lock on every OS")
9091
ubuntu = [c for c in pr if c[0] == "ubuntu-latest"]
9192
self.assertEqual({c[1] for c in ubuntu}, {"1.82.0", "1.93.1", "stable"}, "every toolchain on PRs")
9293
self.assertEqual({c[2] for c in ubuntu}, {"", "1", "2", "3", "4"}, "every lock on PRs")
@@ -100,7 +101,7 @@ def test_bundle_covers_every_os(self):
100101
for os_name in ("ubuntu-latest", "macos-latest", "windows-latest"):
101102
with self.subTest(os=os_name):
102103
suites = bundle.suites_for(os_name, TEXT)
103-
for job in ("e2e", "e2e-full"):
104+
for job in ("e2e", "e2e-full", "e2e-macos"):
104105
for row in rows(job):
105106
if row["os"] == os_name:
106107
for suite in bundle.row_suites(row):
@@ -268,11 +269,13 @@ class PdmCapstone(unittest.TestCase):
268269
def test_excludes_exactly_the_cells_ci_runs_on_every_pr(self):
269270
excluded = rows_mod.matrix_include([l.replace("exclude:", "include:") for l in self.job])
270271
ci = {(r["os"], r["pdm"]) for r in rows("e2e") if "pdm" in r}
271-
self.assertEqual({(r["os"], r["pdm"]) for r in excluded}, ci)
272-
self.assertEqual(len(excluded), len(ci))
273-
for row in rows("e2e"):
274-
if "pdm" in row:
275-
self.assertEqual(row.get("test_filter"), "pdm:: --ignored")
272+
ci |= {(r["os"], r["pdm"]) for r in rows("e2e-macos") if "pdm" in r}
273+
self.assertEqual({(r["os"], r["pdm"]) for r in excluded if "pdm" in r}, ci)
274+
self.assertEqual(len([r for r in excluded if "pdm" in r]), len(ci))
275+
for job in ("e2e", "e2e-macos"):
276+
for row in rows(job):
277+
if "pdm" in row:
278+
self.assertEqual(row.get("test_filter"), "pdm:: --ignored")
276279
self.assertFalse(any("pdm" in r for r in rows("e2e-full")),
277280
"a pdm row off the PR tier would leave its cell unrun on PRs")
278281
versions = re.search(r"pdm: \[([^\]]*)\]", "\n".join(self.job)).group(1)

‎scripts/tests/test_ci_vlt_rows.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def step(job_lines, name):
148148

149149
class CiE2eVltRows(unittest.TestCase):
150150
ci = jobs(CI.read_text(encoding="utf-8"))
151-
rows = matrix_include(ci["e2e"])
151+
rows = matrix_include(ci["e2e"]) + matrix_include(ci["e2e-macos"])
152152
vlt_rows = [r for r in rows if "vlt" in r or "vlt" in r.get("suite", "")]
153153

154154
def test_every_vlt_row_pins_a_release_and_includes_the_ignored_legs(self):
@@ -241,7 +241,7 @@ def test_hosted_e2e_proves_vlt_against_production(self):
241241

242242
class CompatibilityWorkflow(unittest.TestCase):
243243
compat = jobs(COMPAT.read_text(encoding="utf-8"))
244-
rows = matrix_include(compat["install-proof"])
244+
rows = matrix_include(compat["install-proof"]) + matrix_include(compat["install-proof-macos"])
245245

246246
def covered(self):
247247
cells = set()
@@ -287,7 +287,7 @@ def test_node_floors_and_store_linkers(self):
287287
step(self.compat["install-proof"], "Collation golden under this Node"))
288288

289289
def test_jobs_and_triggers(self):
290-
for job in ("build", "install-proof", "native", "lock-diff", "canary", "downgrade"):
290+
for job in ("build", "install-proof", "install-proof-macos", "native", "lock-diff", "canary", "downgrade"):
291291
self.assertIn(job, self.compat)
292292
text = COMPAT.read_text(encoding="utf-8")
293293
self.assertIn("schedule:", text)

‎scripts/tests/test_vlt_coverage.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,12 @@ def ci_ids(self):
119119
(ROOT / ".github/workflows/vlt-compatibility.yml").read_text(encoding="utf-8"))
120120
ids = {f"ci:{r['suite']}:{r['os']}:{r['vlt']}"
121121
for r in self.rows.matrix_include(ci["e2e"]) if "vlt" in r}
122+
ids |= {f"ci:{r['suite']}:{r['os']}:{r['vlt']}"
123+
for r in self.rows.matrix_include(ci["e2e-macos"]) if "vlt" in r}
122124
ids |= {f"compat:{r['os']}:{r['vlt']}"
123125
for r in self.rows.matrix_include(compat["install-proof"])}
126+
ids |= {f"compat:{r['os']}:{r['vlt']}"
127+
for r in self.rows.matrix_include(compat["install-proof-macos"])}
124128
return ids
125129

126130
def test_every_code_is_mapped_and_documented(self):

0 commit comments

Comments
 (0)