mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-13 08:29:04 +02:00
test(windows): curate the seven POSIX-bound files the expanded lane surfaced; fix flag-utils path embedding
First full run of the expanded Windows lane (13 -> ~258 files, PR #2593 run 31918591602) failed in exactly 8 files. One was a real test bug, fixed: design-flag-utils embedded a raw Windows ROOT into a bun -e string where backslashes act as escapes (D:\a\gstack imported as D:agstack) — forward slashes work on every platform. The other seven are POSIX-bound in ways the content patterns cannot see (sed/ln/bash ARE their subject, a shebang shim arrives via variable, wall-clock retry bounds on the slowest runner) — each gets a receipted KNOWN_WINDOWS_INCOMPATIBLE entry, and the census pin now covers that list so a renamed file fails the suite instead of silently keeping a stale exclusion.
This commit is contained in:
@@ -90,8 +90,12 @@ describe("parseIntFlag contract (#2032, codex 17a-c)", () => {
|
||||
|
||||
describe("normalizeIntFlag CLI wrapper (exit-1 semantics)", () => {
|
||||
function runWrapper(rawExpr: string, specExpr: string): { status: number; stderr: string } {
|
||||
// Forward slashes: a raw Windows ROOT embeds backslashes into the eval
|
||||
// string where they act as ESCAPES ("D:\\a\\gstack" imports as
|
||||
// "D:agstack" — first Windows lane run). Import specifiers accept
|
||||
// forward slashes on every platform.
|
||||
const script = `
|
||||
import { normalizeIntFlag } from "${ROOT}/design/src/flag-utils";
|
||||
import { normalizeIntFlag } from "${ROOT.replaceAll('\\', '/')}/design/src/flag-utils";
|
||||
const v = normalizeIntFlag(${rawExpr}, ${specExpr});
|
||||
console.log("VALUE:" + v);
|
||||
`;
|
||||
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
DEFAULT_WALL_TIMEOUT_MS,
|
||||
PER_FILE_WALL_MS,
|
||||
wallTimeoutForShard,
|
||||
KNOWN_WINDOWS_INCOMPATIBLE,
|
||||
TEST_ROOTS,
|
||||
TREE_MUTATING,
|
||||
WORKER_HOSTILE,
|
||||
@@ -535,6 +536,12 @@ describe('test-free-shards: curated-list census pins', () => {
|
||||
expect(stale).toEqual([]);
|
||||
});
|
||||
|
||||
test('every KNOWN_WINDOWS_INCOMPATIBLE entry names a real free test file', () => {
|
||||
const census = new Set(collectFreeTestFiles(ROOT));
|
||||
const stale = KNOWN_WINDOWS_INCOMPATIBLE.map((e) => e.file).filter((f) => !census.has(f));
|
||||
expect(stale).toEqual([]);
|
||||
});
|
||||
|
||||
test('every TEST_ROOTS entry exists on disk and contributes at least one test file', () => {
|
||||
const files = collectFreeTestFiles(ROOT);
|
||||
for (const root of TEST_ROOTS) {
|
||||
|
||||
Reference in New Issue
Block a user