Skip to content

Commit 63fdc57

Browse files
committed
fix(test): route mac helper script owners
1 parent a39a3b7 commit 63fdc57

2 files changed

Lines changed: 28 additions & 2 deletions

File tree

scripts/test-projects.test-support.mjs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,7 @@ const TOOLING_SOURCE_TEST_TARGETS = new Map([
956956
"scripts/github/run-openclaw-cross-os-release-checks.sh",
957957
["test/scripts/openclaw-cross-os-release-workflow.test.ts"],
958958
],
959+
["scripts/lib/restart-mac-gateway.sh", ["test/scripts/restart-mac.test.ts"]],
959960
[
960961
"scripts/github/security-sensitive-guard.mjs",
961962
[
@@ -3109,11 +3110,15 @@ function resolveParallelsToolingTestTargets(changedPath) {
31093110
if (
31103111
!/^scripts\/e2e\/parallels\/[^/]+\.ts$/u.test(changedPath) &&
31113112
!/^scripts\/e2e\/parallels-(?:linux|macos|npm-update|windows)-smoke\.sh$/u.test(changedPath) &&
3112-
!/^scripts\/e2e\/lib\/parallels-package\/build-info-commit\.mjs$/u.test(changedPath)
3113+
!/^scripts\/e2e\/lib\/parallels-package\/build-info-commit\.mjs$/u.test(changedPath) &&
3114+
!/^scripts\/e2e\/lib\/parallels-(?:macos|package)-common\.sh$/u.test(changedPath)
31133115
) {
31143116
return null;
31153117
}
3116-
if (/^scripts\/e2e\/lib\/parallels-package\/build-info-commit\.mjs$/u.test(changedPath)) {
3118+
if (
3119+
/^scripts\/e2e\/lib\/parallels-package\/build-info-commit\.mjs$/u.test(changedPath) ||
3120+
/^scripts\/e2e\/lib\/parallels-(?:macos|package)-common\.sh$/u.test(changedPath)
3121+
) {
31173122
return ["test/scripts/parallels-lib-helpers.test.ts"];
31183123
}
31193124
const targets = ["test/scripts/parallels-smoke-model.test.ts"];

test/scripts/test-projects.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,8 @@ describe("scripts/test-projects changed-target routing", () => {
22992299
"scripts/e2e/parallels/windows-smoke.ts",
23002300
"scripts/e2e/parallels-windows-smoke.sh",
23012301
"scripts/e2e/lib/parallels-package/build-info-commit.mjs",
2302+
"scripts/e2e/lib/parallels-macos-common.sh",
2303+
"scripts/e2e/lib/parallels-package-common.sh",
23022304
]),
23032305
).toEqual([
23042306
{
@@ -2315,6 +2317,25 @@ describe("scripts/test-projects changed-target routing", () => {
23152317
]);
23162318
});
23172319

2320+
it("routes mac restart helpers through restart-mac owner tests", () => {
2321+
expect(resolveChangedTestTargetPlan(["scripts/lib/restart-mac-gateway.sh"])).toEqual({
2322+
mode: "targets",
2323+
targets: ["test/scripts/restart-mac.test.ts"],
2324+
});
2325+
});
2326+
2327+
it("routes Parallels common shell helpers through lib helper owner tests", () => {
2328+
for (const changedPath of [
2329+
"scripts/e2e/lib/parallels-macos-common.sh",
2330+
"scripts/e2e/lib/parallels-package-common.sh",
2331+
]) {
2332+
expect(resolveChangedTestTargetPlan([changedPath]), changedPath).toEqual({
2333+
mode: "targets",
2334+
targets: ["test/scripts/parallels-lib-helpers.test.ts"],
2335+
});
2336+
}
2337+
});
2338+
23182339
it("routes MCP Docker E2E script targets instead of skipping changed tests", () => {
23192340
const targets = [
23202341
"scripts/e2e/mcp-channels-docker.sh",

0 commit comments

Comments
 (0)