Run launcher binary tests in the Windows PR checker

Keep --bins in the Windows launcher test command so binary-owned tests
are checked alongside the library, matching the planned validation.

Fixes #11747
This commit is contained in:
M0-kii committed 2026-11-07 15:35:53 +03:30
1 parent ea55e8156c
commit 68ec463175
2 files changed
+21 -1

No files matched your search

+20
View File
@@ -199,6 +199,26 @@ class PrReadyTests(unittest.TestCase):
for name in ("launcher rustfmt", "launcher clippy", "launcher tests"):
self.assertIsNone(by_name[name].skip)
@unittest.skipUnless(shutil.which("cargo"), "needs cargo")
def test_windows_launcher_checks_include_binary_tests(self):
with tempfile.TemporaryDirectory() as temp:
root = Path(temp)
launcher = root / "launcher"
(launcher / "src").mkdir(parents=True)
(launcher / "Cargo.toml").write_text(
'[package]\nname = "launcher-check-fixture"\nversion = "0.1.0"\nedition = "2021"\n[workspace]\n')
(launcher / "src/lib.rs").write_text('#[test]\nfn library_passes() {}\n')
(launcher / "src/main.rs").write_text(
'fn main() {}\n#[test]\nfn binary_fails() { panic!("launcher binary test ran"); }\n')
with mock.patch.object(pr_ready, "ROOT", root), \
mock.patch.dict(os.environ, {"CARGO_TARGET_DIR": str(root / "target")}):
subprocess.run(["cargo", "generate-lockfile", "--offline"], cwd=launcher, check=True,
capture_output=True)
step = pr_ready.Step("launcher tests", "cargo test --locked --lib --bins")
pr_ready.run_windows([step], verbose=False)
self.assertEqual(step.status, "fail")
self.assertIn("launcher binary test ran", step.output)
@unittest.skipUnless(POSIX_BASH, "needs a bash that is not WSL's")
def test_the_launcher_fallback_asks_for_a_feature_the_launcher_has(self):
"""The macOS fallback must name gpui_platform/runtime_shaders: gpui_platform is launcher/Cargo.toml's
+1 -1
View File
@@ -488,7 +488,7 @@ def run_windows(steps, verbose):
command = ["cargo", "clippy", "--all-targets", "--locked", "--", "-D", "warnings"]
cwd = ROOT / "launcher"
elif step.name == "launcher tests":
command = ["cargo", "test", "--locked", "--lib"]
command = ["cargo", "test", "--locked", "--lib", "--bins"]
cwd = ROOT / "launcher"
elif step.name == "Parity":
command = shlex.split(step.command)