fix(test): route mac helper script owners

This commit is contained in:
Vincent Koc
2026-06-21 16:37:00 +02:00
parent a39a3b74de
commit 63fdc57b3a
2 changed files with 28 additions and 2 deletions

View File

@@ -956,6 +956,7 @@ const TOOLING_SOURCE_TEST_TARGETS = new Map([
"scripts/github/run-openclaw-cross-os-release-checks.sh",
["test/scripts/openclaw-cross-os-release-workflow.test.ts"],
],
["scripts/lib/restart-mac-gateway.sh", ["test/scripts/restart-mac.test.ts"]],
[
"scripts/github/security-sensitive-guard.mjs",
[
@@ -3109,11 +3110,15 @@ function resolveParallelsToolingTestTargets(changedPath) {
if (
!/^scripts\/e2e\/parallels\/[^/]+\.ts$/u.test(changedPath) &&
!/^scripts\/e2e\/parallels-(?:linux|macos|npm-update|windows)-smoke\.sh$/u.test(changedPath) &&
!/^scripts\/e2e\/lib\/parallels-package\/build-info-commit\.mjs$/u.test(changedPath)
!/^scripts\/e2e\/lib\/parallels-package\/build-info-commit\.mjs$/u.test(changedPath) &&
!/^scripts\/e2e\/lib\/parallels-(?:macos|package)-common\.sh$/u.test(changedPath)
) {
return null;
}
if (/^scripts\/e2e\/lib\/parallels-package\/build-info-commit\.mjs$/u.test(changedPath)) {
if (
/^scripts\/e2e\/lib\/parallels-package\/build-info-commit\.mjs$/u.test(changedPath) ||
/^scripts\/e2e\/lib\/parallels-(?:macos|package)-common\.sh$/u.test(changedPath)
) {
return ["test/scripts/parallels-lib-helpers.test.ts"];
}
const targets = ["test/scripts/parallels-smoke-model.test.ts"];

View File

@@ -2299,6 +2299,8 @@ describe("scripts/test-projects changed-target routing", () => {
"scripts/e2e/parallels/windows-smoke.ts",
"scripts/e2e/parallels-windows-smoke.sh",
"scripts/e2e/lib/parallels-package/build-info-commit.mjs",
"scripts/e2e/lib/parallels-macos-common.sh",
"scripts/e2e/lib/parallels-package-common.sh",
]),
).toEqual([
{
@@ -2315,6 +2317,25 @@ describe("scripts/test-projects changed-target routing", () => {
]);
});
it("routes mac restart helpers through restart-mac owner tests", () => {
expect(resolveChangedTestTargetPlan(["scripts/lib/restart-mac-gateway.sh"])).toEqual({
mode: "targets",
targets: ["test/scripts/restart-mac.test.ts"],
});
});
it("routes Parallels common shell helpers through lib helper owner tests", () => {
for (const changedPath of [
"scripts/e2e/lib/parallels-macos-common.sh",
"scripts/e2e/lib/parallels-package-common.sh",
]) {
expect(resolveChangedTestTargetPlan([changedPath]), changedPath).toEqual({
mode: "targets",
targets: ["test/scripts/parallels-lib-helpers.test.ts"],
});
}
});
it("routes MCP Docker E2E script targets instead of skipping changed tests", () => {
const targets = [
"scripts/e2e/mcp-channels-docker.sh",