@descryy/runtime-test-runner 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE +6 -0
  2. package/dist/collector-version.d.ts +2 -6
  3. package/dist/collector-version.d.ts.map +1 -1
  4. package/dist/collector-version.js +2 -6
  5. package/dist/collector-version.js.map +1 -1
  6. package/dist/go-test.d.ts +24 -50
  7. package/dist/go-test.d.ts.map +1 -1
  8. package/dist/go-test.js +30 -68
  9. package/dist/go-test.js.map +1 -1
  10. package/dist/graph-mapping.d.ts +10 -28
  11. package/dist/graph-mapping.d.ts.map +1 -1
  12. package/dist/graph-mapping.js +16 -43
  13. package/dist/graph-mapping.js.map +1 -1
  14. package/dist/jest-reporter.d.ts +20 -46
  15. package/dist/jest-reporter.d.ts.map +1 -1
  16. package/dist/jest-reporter.js +28 -71
  17. package/dist/jest-reporter.js.map +1 -1
  18. package/dist/playwright-reporter.d.ts +16 -34
  19. package/dist/playwright-reporter.d.ts.map +1 -1
  20. package/dist/playwright-reporter.js +22 -51
  21. package/dist/playwright-reporter.js.map +1 -1
  22. package/dist/reporter.d.ts +7 -19
  23. package/dist/reporter.d.ts.map +1 -1
  24. package/dist/reporter.js +18 -52
  25. package/dist/reporter.js.map +1 -1
  26. package/dist/swift-xctest.d.ts +40 -94
  27. package/dist/swift-xctest.d.ts.map +1 -1
  28. package/dist/swift-xctest.js +47 -105
  29. package/dist/swift-xctest.js.map +1 -1
  30. package/dist/test-runner-collector.d.ts +14 -1
  31. package/dist/test-runner-collector.d.ts.map +1 -1
  32. package/dist/test-runner-collector.js +10 -0
  33. package/dist/test-runner-collector.js.map +1 -1
  34. package/dist/vitest-reporter.d.ts +19 -43
  35. package/dist/vitest-reporter.d.ts.map +1 -1
  36. package/dist/vitest-reporter.js +30 -82
  37. package/dist/vitest-reporter.js.map +1 -1
  38. package/package.json +12 -7
@@ -1,71 +1,33 @@
1
1
  /**
2
- * Swift's XCTest half of §17, observed through a custom `XCTestObservation`
3
- * hooked directly into the test process, in-process and streaming — not
4
- * `swift test --xunit-output`'s end-of-run artifact (RT-181), which on
5
- * Swift 6.1.2/Linux covers swift-testing only and silently reports a
6
- * smaller, clean-looking run for one where twice as many tests ran and half
7
- * of them failed. This closes the "real path... a different piece of work
8
- * from consuming an artifact" RT-181 named but did not build.
2
+ * Swift XCTest half of §17: a custom `XCTestObservation` hooked directly into
3
+ * the test process, in-process and streaming — not `swift test --xunit-output`'s
4
+ * end-of-run artifact (RT-181), which on Swift 6.1.2/Linux covers swift-testing
5
+ * only and silently underreports a mixed run.
9
6
  *
10
- * ## Why this is not a seventh `PROFILES` entry in `test-runner-collector.ts`
7
+ * Not a seventh `PROFILES` entry: XCTest on Linux has no reporter flag to inject.
8
+ * SwiftPM's generated runner calls `XCTMain(...)` with no `observers:` argument,
9
+ * and its own `SwiftPMXCTestObserver` is confirmed dead (never instantiated).
10
+ * What Linux does honor is `Tests/LinuxMain.swift` — SwiftPM's pre-automatic-
11
+ * discovery entry point. When present it replaces the generated runner outright,
12
+ * and a plain `addTestObserver(...)` call inside it receives every callback in
13
+ * real time. So this collector runs two passes: build once to discover tests
14
+ * (`--dump-tests-json` on the built `.xctest` binary, ordinary discovery, no
15
+ * `LinuxMain.swift` needed), generate a `LinuxMain.swift` naming every
16
+ * discovered class/method, then spawn the real `swift test` run against it.
11
17
  *
12
- * Every runner on that seam is one spawn: inject a reporter flag, run the
13
- * command as given. XCTest on Linux has no such flag. SwiftPM's generated
14
- * test entry point (`runner.swift`, rebuilt fresh every build — not
15
- * something a caller can edit) calls `XCTMain(__allDiscoveredTests())` with
16
- * no `observers:` argument at all, even though the symbol accepts one and
17
- * `swift test`'s own template privately builds — but never wires up — an
18
- * `XCTestObservation` conformer of its own (`SwiftPMXCTestObserver`,
19
- * confirmed dead: never instantiated, and its `testOutputPath` file never
20
- * appears even under `--parallel`). So there is no flag to inject.
18
+ * Trade-off, disclosed: `Tests/LinuxMain.swift`'s presence disables swift-testing
19
+ * entirely while active, not just XCTest dispatch — a `@Test` function is simply
20
+ * never invoked (measured), the mirror image of RT-181's gap, not a fix for both
21
+ * halves at once. `stop()` removes the generated file afterward so an unattended
22
+ * `swift test` reverts to normal dual-framework discovery.
21
23
  *
22
- * What Linux *does* still honor is `Tests/LinuxMain.swift` — SwiftPM's
23
- * pre-automatic-discovery entry point. Measured directly: when present, it
24
- * replaces the generated runner outright (`swift test` skips building the
25
- * `*PackageDiscoveredTests` module entirely when it exists), and a plain
26
- * `XCTestObservationCenter.shared.addTestObserver(...)` call inside it
27
- * genuinely receives every callback, streamed in real time, interleaved
28
- * with the runner's own console output — not collected after the process
29
- * exits.
24
+ * Generated file is never a guess: class/method names come from `--dump-tests-json`
25
+ * against a real build, and the generated `__descryAllTests` extension per class
26
+ * avoids colliding with a project's own legacy `allTests`.
30
27
  *
31
- * So this collector runs in two passes: build the tests once to discover
32
- * them (`--dump-tests-json`, a real flag on the built `.xctest` binary,
33
- * needing no `LinuxMain.swift` of its own — the discovery build uses
34
- * SwiftPM's ordinary automatic discovery), generate a `LinuxMain.swift`
35
- * naming every discovered class and method, then spawn `swift test` for
36
- * real, which rebuilds against the generated file and runs it.
37
- *
38
- * ## The trade-off this creates, disclosed rather than hidden
39
- *
40
- * `Tests/LinuxMain.swift`'s presence does not just replace the XCTest
41
- * dispatch, it removes the swift-testing one too. Measured directly: a
42
- * package with both an XCTest method and a swift-testing `@Test` function,
43
- * with no `LinuxMain.swift`, runs both — `swift test` invokes the built
44
- * binary twice, once per `--testing-library` value. With a
45
- * `LinuxMain.swift` present — ours or anyone's — the `@Test` function does
46
- * not run at all: not skipped, not reported, simply never invoked; not
47
- * even its banner line prints. So this collector observes the XCTest half
48
- * in real time and *stops covering swift-testing while it is active* — the
49
- * mirror image of RT-181's gap, not a fix for both halves at once.
50
- * `stop()` removes the generated file afterward so an unattended
51
- * `swift test` reverts to normal dual-framework discovery once this
52
- * collector is done.
53
- *
54
- * ## The generated file is never a guess at the user's code
55
- *
56
- * Every class and method name comes from `--dump-tests-json` against a real
57
- * build of the real target — the same build-time-derived source SwiftPM's
58
- * own automatic discovery already trusts, not a scrape of source text. No
59
- * `allTests` needs to exist anywhere in the user's own code; the generated
60
- * file adds its own `__descryAllTests` extension per class instead, so a
61
- * project that already declares a legacy `allTests` is never collided with.
62
- *
63
- * **Known limitation, disclosed rather than silently mishandled:** two test
64
- * classes of the same bare name in two different modules of the same
65
- * package produce two `extension <Name>` blocks that collide. Real, and not
66
- * solved here — `discoverClasses` still returns both, and the generated
67
- * file fails to compile rather than silently picking one, which is the
68
- * refuse-rather-than-guess the rest of this codebase holds to.
28
+ * Known limitation: two classes with the same bare name in different modules
29
+ * produce two colliding `extension <Name>` blocks. Not solved — the generated
30
+ * file fails to compile rather than silently picking one (refuse over guess).
69
31
  */
70
32
  import type { Collector } from "@descryy/runtime-contracts";
71
33
  import { type TraceCoverage } from "./test-runner-collector.ts";
@@ -79,24 +41,16 @@ export interface DiscoveredSwiftClass {
79
41
  readonly methods: readonly string[];
80
42
  }
81
43
  /**
82
- * `--dump-tests-json`'s tree has no explicit node kind — a class is
83
- * recognised structurally, as a node whose every child is itself a leaf (a
84
- * bare `{"name": "testFoo"}` with no `tests` of its own, which is exactly
85
- * the shape a test *method* has and a bundle/suite container never does).
86
- * Anything else — the root, `"debug.xctest"`, a suite — is a container and
87
- * is recursed into instead.
88
- *
89
- * A node whose name carries no `.` (so not `Module.Class`) is skipped
90
- * rather than guessed at — `--dump-tests-json`'s own class names are always
91
- * qualified this way in every build observed, and a bare name reaching here
92
- * would mean this method's own structural assumption is wrong for that
93
- * node, which is worth surfacing as a dropped class rather than papering
94
- * over with an invented module.
44
+ * `--dump-tests-json`'s tree has no explicit node kind — a class is recognised
45
+ * structurally: a node whose every child is a leaf (bare `{"name": "testFoo"}`,
46
+ * no `tests`), the shape a test method has and a container never does.
47
+ * Everything else recurses. A name with no `.` (not `Module.Class`) is skipped
48
+ * rather than guessed at — every observed build qualifies class names this way.
95
49
  */
96
50
  export declare function discoverClasses(dump: SwiftTestDump): DiscoveredSwiftClass[];
97
- /** Present at the top of every file this module writes — never anything a human authored. `stop()` refuses to delete a `Tests/LinuxMain.swift` that lacks it. */
51
+ /** Marks every file this module writes; `stop()` refuses to delete a `Tests/LinuxMain.swift` that lacks it. */
98
52
  export declare const GENERATED_MARKER = "// Generated by @descryy/runtime-test-runner's swift-xctest observer -- safe to delete, regenerated on every observed run.";
99
- /** Pure: builds `Tests/LinuxMain.swift`'s full text from the classes `discoverClasses` found. No filesystem access. */
53
+ /** Pure: builds `Tests/LinuxMain.swift`'s text from `discoverClasses`' output. No filesystem access. */
100
54
  export declare function generateLinuxMain(classes: readonly DiscoveredSwiftClass[]): string;
101
55
  export type SwiftDiscoveryResult = {
102
56
  readonly ok: true;
@@ -106,33 +60,25 @@ export type SwiftDiscoveryResult = {
106
60
  readonly reason: string;
107
61
  };
108
62
  /**
109
- * Builds the tests once (ordinary automatic discovery — no `LinuxMain.swift`
110
- * involved yet) and reads back `--dump-tests-json` from the resulting
111
- * binary. A pre-existing Descry-generated `LinuxMain.swift` is removed
112
- * first: left in place, this build would use last run's stale class list
113
- * rather than discovering fresh, and could fail outright if a module it
114
- * names has since been removed.
63
+ * Builds tests once (ordinary discovery, no `LinuxMain.swift` yet) and reads
64
+ * `--dump-tests-json` from the binary. A pre-existing Descry-generated
65
+ * `LinuxMain.swift` is removed first: left in place, the build would use last
66
+ * run's stale class list instead of discovering fresh.
115
67
  */
116
68
  export declare function discoverSwiftTests(packageRoot: string): SwiftDiscoveryResult;
117
- /** Writes the generated file. Refuses (rather than overwrites) if a non-Descry `Tests/LinuxMain.swift` has appeared since `discoverSwiftTests` ran. */
69
+ /** Refuses to overwrite a non-Descry `Tests/LinuxMain.swift` that has appeared since `discoverSwiftTests` ran. */
118
70
  export declare function writeLinuxMain(packageRoot: string, classes: readonly DiscoveredSwiftClass[]): void;
119
- /** Removes a Descry-generated `Tests/LinuxMain.swift`, and only one — never a file this module did not write. */
71
+ /** Removes a Descry-generated `Tests/LinuxMain.swift` only — never a file this module didn't write. */
120
72
  export declare function removeGeneratedLinuxMain(packageRoot: string): void;
121
73
  export interface SwiftXCTestCollectorOptions {
122
74
  readonly packageRoot: string;
123
- /** Joins emitted Evidence back to a named service, same convention as every other collector. Omit for a standalone test run with no corresponding service. */
75
+ /** Joins emitted Evidence to a named service; omit for a standalone run with no corresponding service. */
124
76
  readonly service?: string;
125
77
  }
126
78
  export interface SwiftXCTestCollector extends Collector {
127
79
  waitForCompletion(): Promise<void>;
128
80
  traceCoverage(): TraceCoverage;
129
81
  }
130
- /**
131
- * The two-pass XCTest collector. `start()` does the discover-then-generate
132
- * work before spawning anything a caller would recognise as "the test run"
133
- * — genuinely slower to become `available` than the single-spawn runners on
134
- * this seam, and that latency is the cost of there being no reporter flag
135
- * to inject instead.
136
- */
82
+ /** Two-pass collector: `start()` discovers-then-generates before spawning the real run — slower to become `available` than the single-spawn runners, the cost of having no reporter flag. */
137
83
  export declare function createSwiftXCTestCollector(options: SwiftXCTestCollectorOptions): SwiftXCTestCollector;
138
84
  //# sourceMappingURL=swift-xctest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"swift-xctest.d.ts","sourceRoot":"","sources":["../src/swift-xctest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAOH,OAAO,KAAK,EAAE,SAAS,EAAiE,MAAM,4BAA4B,CAAC;AAE3H,OAAO,EAAyE,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAGvI,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,C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AAS,oBAAoB,EAAE,GAAG,IAAI,CAMlG;AAED,uGAAuG;AACvG,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAKlE;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,0GAA0G;IAC1G,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAmBD,MAAM,WAAW,oBAAqB,SAAQ,SAAS;IACrD,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,aAAa,IAAI,aAAa,CAAC;CAChC;AAED,6LAA6L;AAC7L,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,2BAA2B,GAAG,oBAAoB,CAoGrG"}
@@ -1,71 +1,33 @@
1
1
  /**
2
- * Swift's XCTest half of §17, observed through a custom `XCTestObservation`
3
- * hooked directly into the test process, in-process and streaming — not
4
- * `swift test --xunit-output`'s end-of-run artifact (RT-181), which on
5
- * Swift 6.1.2/Linux covers swift-testing only and silently reports a
6
- * smaller, clean-looking run for one where twice as many tests ran and half
7
- * of them failed. This closes the "real path... a different piece of work
8
- * from consuming an artifact" RT-181 named but did not build.
2
+ * Swift XCTest half of §17: a custom `XCTestObservation` hooked directly into
3
+ * the test process, in-process and streaming — not `swift test --xunit-output`'s
4
+ * end-of-run artifact (RT-181), which on Swift 6.1.2/Linux covers swift-testing
5
+ * only and silently underreports a mixed run.
9
6
  *
10
- * ## Why this is not a seventh `PROFILES` entry in `test-runner-collector.ts`
7
+ * Not a seventh `PROFILES` entry: XCTest on Linux has no reporter flag to inject.
8
+ * SwiftPM's generated runner calls `XCTMain(...)` with no `observers:` argument,
9
+ * and its own `SwiftPMXCTestObserver` is confirmed dead (never instantiated).
10
+ * What Linux does honor is `Tests/LinuxMain.swift` — SwiftPM's pre-automatic-
11
+ * discovery entry point. When present it replaces the generated runner outright,
12
+ * and a plain `addTestObserver(...)` call inside it receives every callback in
13
+ * real time. So this collector runs two passes: build once to discover tests
14
+ * (`--dump-tests-json` on the built `.xctest` binary, ordinary discovery, no
15
+ * `LinuxMain.swift` needed), generate a `LinuxMain.swift` naming every
16
+ * discovered class/method, then spawn the real `swift test` run against it.
11
17
  *
12
- * Every runner on that seam is one spawn: inject a reporter flag, run the
13
- * command as given. XCTest on Linux has no such flag. SwiftPM's generated
14
- * test entry point (`runner.swift`, rebuilt fresh every build — not
15
- * something a caller can edit) calls `XCTMain(__allDiscoveredTests())` with
16
- * no `observers:` argument at all, even though the symbol accepts one and
17
- * `swift test`'s own template privately builds — but never wires up — an
18
- * `XCTestObservation` conformer of its own (`SwiftPMXCTestObserver`,
19
- * confirmed dead: never instantiated, and its `testOutputPath` file never
20
- * appears even under `--parallel`). So there is no flag to inject.
18
+ * Trade-off, disclosed: `Tests/LinuxMain.swift`'s presence disables swift-testing
19
+ * entirely while active, not just XCTest dispatch — a `@Test` function is simply
20
+ * never invoked (measured), the mirror image of RT-181's gap, not a fix for both
21
+ * halves at once. `stop()` removes the generated file afterward so an unattended
22
+ * `swift test` reverts to normal dual-framework discovery.
21
23
  *
22
- * What Linux *does* still honor is `Tests/LinuxMain.swift` — SwiftPM's
23
- * pre-automatic-discovery entry point. Measured directly: when present, it
24
- * replaces the generated runner outright (`swift test` skips building the
25
- * `*PackageDiscoveredTests` module entirely when it exists), and a plain
26
- * `XCTestObservationCenter.shared.addTestObserver(...)` call inside it
27
- * genuinely receives every callback, streamed in real time, interleaved
28
- * with the runner's own console output — not collected after the process
29
- * exits.
24
+ * Generated file is never a guess: class/method names come from `--dump-tests-json`
25
+ * against a real build, and the generated `__descryAllTests` extension per class
26
+ * avoids colliding with a project's own legacy `allTests`.
30
27
  *
31
- * So this collector runs in two passes: build the tests once to discover
32
- * them (`--dump-tests-json`, a real flag on the built `.xctest` binary,
33
- * needing no `LinuxMain.swift` of its own — the discovery build uses
34
- * SwiftPM's ordinary automatic discovery), generate a `LinuxMain.swift`
35
- * naming every discovered class and method, then spawn `swift test` for
36
- * real, which rebuilds against the generated file and runs it.
37
- *
38
- * ## The trade-off this creates, disclosed rather than hidden
39
- *
40
- * `Tests/LinuxMain.swift`'s presence does not just replace the XCTest
41
- * dispatch, it removes the swift-testing one too. Measured directly: a
42
- * package with both an XCTest method and a swift-testing `@Test` function,
43
- * with no `LinuxMain.swift`, runs both — `swift test` invokes the built
44
- * binary twice, once per `--testing-library` value. With a
45
- * `LinuxMain.swift` present — ours or anyone's — the `@Test` function does
46
- * not run at all: not skipped, not reported, simply never invoked; not
47
- * even its banner line prints. So this collector observes the XCTest half
48
- * in real time and *stops covering swift-testing while it is active* — the
49
- * mirror image of RT-181's gap, not a fix for both halves at once.
50
- * `stop()` removes the generated file afterward so an unattended
51
- * `swift test` reverts to normal dual-framework discovery once this
52
- * collector is done.
53
- *
54
- * ## The generated file is never a guess at the user's code
55
- *
56
- * Every class and method name comes from `--dump-tests-json` against a real
57
- * build of the real target — the same build-time-derived source SwiftPM's
58
- * own automatic discovery already trusts, not a scrape of source text. No
59
- * `allTests` needs to exist anywhere in the user's own code; the generated
60
- * file adds its own `__descryAllTests` extension per class instead, so a
61
- * project that already declares a legacy `allTests` is never collided with.
62
- *
63
- * **Known limitation, disclosed rather than silently mishandled:** two test
64
- * classes of the same bare name in two different modules of the same
65
- * package produce two `extension <Name>` blocks that collide. Real, and not
66
- * solved here — `discoverClasses` still returns both, and the generated
67
- * file fails to compile rather than silently picking one, which is the
68
- * refuse-rather-than-guess the rest of this codebase holds to.
28
+ * Known limitation: two classes with the same bare name in different modules
29
+ * produce two colliding `extension <Name>` blocks. Not solved — the generated
30
+ * file fails to compile rather than silently picking one (refuse over guess).
69
31
  */
70
32
  import { existsSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
71
33
  import { join } from "node:path";
@@ -74,19 +36,11 @@ import { spawnProcess } from "@descryy/runtime-controller";
74
36
  import { createEnvelopeGate, createEventTranslator, pumpLines, isNodeTestEvent } from "./test-runner-collector.js";
75
37
  import { COLLECTOR_VERSION } from "./collector-version.js";
76
38
  /**
77
- * `--dump-tests-json`'s tree has no explicit node kind — a class is
78
- * recognised structurally, as a node whose every child is itself a leaf (a
79
- * bare `{"name": "testFoo"}` with no `tests` of its own, which is exactly
80
- * the shape a test *method* has and a bundle/suite container never does).
81
- * Anything else — the root, `"debug.xctest"`, a suite — is a container and
82
- * is recursed into instead.
83
- *
84
- * A node whose name carries no `.` (so not `Module.Class`) is skipped
85
- * rather than guessed at — `--dump-tests-json`'s own class names are always
86
- * qualified this way in every build observed, and a bare name reaching here
87
- * would mean this method's own structural assumption is wrong for that
88
- * node, which is worth surfacing as a dropped class rather than papering
89
- * over with an invented module.
39
+ * `--dump-tests-json`'s tree has no explicit node kind — a class is recognised
40
+ * structurally: a node whose every child is a leaf (bare `{"name": "testFoo"}`,
41
+ * no `tests`), the shape a test method has and a container never does.
42
+ * Everything else recurses. A name with no `.` (not `Module.Class`) is skipped
43
+ * rather than guessed at — every observed build qualifies class names this way.
90
44
  */
91
45
  export function discoverClasses(dump) {
92
46
  const out = [];
@@ -109,17 +63,15 @@ export function discoverClasses(dump) {
109
63
  walk(dump);
110
64
  return out;
111
65
  }
112
- /** Present at the top of every file this module writes — never anything a human authored. `stop()` refuses to delete a `Tests/LinuxMain.swift` that lacks it. */
66
+ /** Marks every file this module writes; `stop()` refuses to delete a `Tests/LinuxMain.swift` that lacks it. */
113
67
  export const GENERATED_MARKER = "// Generated by @descryy/runtime-test-runner's swift-xctest observer -- safe to delete, regenerated on every observed run.";
114
68
  /**
115
- * The observer body, proven against a real `swift test` run before being
116
- * templated here (not derived from documentation alone): `testCase.name` on
117
- * Linux swift-corelibs-xctest is already `"<Class>.<method>"`, so it serves
118
- * directly as both `name` and `qualifiedName` — XCTest has no `describe()`
119
- * nesting for a `SuiteStack` to reconstruct. `testCase(_:didFailWithDescription:inFile:atLine:)`
120
- * is the non-Darwin overload (confirmed against the exported symbols in
121
- * `libXCTest.so`); the Darwin-only `XCTIssue` overload does not exist on
122
- * this platform and is not referenced.
69
+ * Proven against a real `swift test` run, not derived from docs alone:
70
+ * `testCase.name` on Linux swift-corelibs-xctest is already `"<Class>.<method>"`,
71
+ * serving directly as both `name` and `qualifiedName` (no `describe()` nesting
72
+ * to reconstruct). Uses the non-Darwin `didFailWithDescription` overload
73
+ * (confirmed against `libXCTest.so`'s exported symbols) — the Darwin-only
74
+ * `XCTIssue` overload doesn't exist on this platform.
123
75
  */
124
76
  const OBSERVER_BODY = `final class DescryXCTestObserver: NSObject, XCTestObservation {
125
77
  private var failureMessage: String?
@@ -153,7 +105,7 @@ const OBSERVER_BODY = `final class DescryXCTestObserver: NSObject, XCTestObserva
153
105
  }
154
106
  }
155
107
  }`;
156
- /** Pure: builds `Tests/LinuxMain.swift`'s full text from the classes `discoverClasses` found. No filesystem access. */
108
+ /** Pure: builds `Tests/LinuxMain.swift`'s text from `discoverClasses`' output. No filesystem access. */
157
109
  export function generateLinuxMain(classes) {
158
110
  const modules = [...new Set(classes.map((c) => c.module))].sort();
159
111
  const imports = modules.map((m) => `@testable import ${m}`).join("\n");
@@ -183,7 +135,7 @@ function run(command, args, cwd) {
183
135
  const result = spawnSync(command, args, { cwd, encoding: "utf8" });
184
136
  return { status: result.status, stdout: result.stdout ?? "", stderr: result.stderr ?? "" };
185
137
  }
186
- /** `swift build --show-bin-path` — the one place this module asks SwiftPM where its own output goes, rather than assuming `.build/<triple>/debug`, which is not a stable public contract. */
138
+ /** Asks SwiftPM for its output dir rather than assuming `.build/<triple>/debug`, not a stable contract. */
187
139
  function binPath(packageRoot) {
188
140
  const result = run("swift", ["build", "--show-bin-path"], packageRoot);
189
141
  if (result.status !== 0)
@@ -197,12 +149,10 @@ function findXCTestBinary(dir) {
197
149
  return found === undefined ? null : join(dir, found);
198
150
  }
199
151
  /**
200
- * Builds the tests once (ordinary automatic discovery — no `LinuxMain.swift`
201
- * involved yet) and reads back `--dump-tests-json` from the resulting
202
- * binary. A pre-existing Descry-generated `LinuxMain.swift` is removed
203
- * first: left in place, this build would use last run's stale class list
204
- * rather than discovering fresh, and could fail outright if a module it
205
- * names has since been removed.
152
+ * Builds tests once (ordinary discovery, no `LinuxMain.swift` yet) and reads
153
+ * `--dump-tests-json` from the binary. A pre-existing Descry-generated
154
+ * `LinuxMain.swift` is removed first: left in place, the build would use last
155
+ * run's stale class list instead of discovering fresh.
206
156
  */
207
157
  export function discoverSwiftTests(packageRoot) {
208
158
  const linuxMain = join(packageRoot, "Tests", "LinuxMain.swift");
@@ -244,7 +194,7 @@ export function discoverSwiftTests(packageRoot) {
244
194
  }
245
195
  return { ok: true, classes };
246
196
  }
247
- /** Writes the generated file. Refuses (rather than overwrites) if a non-Descry `Tests/LinuxMain.swift` has appeared since `discoverSwiftTests` ran. */
197
+ /** Refuses to overwrite a non-Descry `Tests/LinuxMain.swift` that has appeared since `discoverSwiftTests` ran. */
248
198
  export function writeLinuxMain(packageRoot, classes) {
249
199
  const linuxMain = join(packageRoot, "Tests", "LinuxMain.swift");
250
200
  if (existsSync(linuxMain) && !readFileSync(linuxMain, "utf8").startsWith(GENERATED_MARKER)) {
@@ -252,7 +202,7 @@ export function writeLinuxMain(packageRoot, classes) {
252
202
  }
253
203
  writeFileSync(linuxMain, generateLinuxMain(classes), "utf8");
254
204
  }
255
- /** Removes a Descry-generated `Tests/LinuxMain.swift`, and only one — never a file this module did not write. */
205
+ /** Removes a Descry-generated `Tests/LinuxMain.swift` only — never a file this module didn't write. */
256
206
  export function removeGeneratedLinuxMain(packageRoot) {
257
207
  const linuxMain = join(packageRoot, "Tests", "LinuxMain.swift");
258
208
  if (existsSync(linuxMain) && readFileSync(linuxMain, "utf8").startsWith(GENERATED_MARKER)) {
@@ -275,13 +225,7 @@ function computeCapabilities() {
275
225
  externalServiceObservation: status,
276
226
  };
277
227
  }
278
- /**
279
- * The two-pass XCTest collector. `start()` does the discover-then-generate
280
- * work before spawning anything a caller would recognise as "the test run"
281
- * — genuinely slower to become `available` than the single-spawn runners on
282
- * this seam, and that latency is the cost of there being no reporter flag
283
- * to inject instead.
284
- */
228
+ /** Two-pass collector: `start()` discovers-then-generates before spawning the real run — slower to become `available` than the single-spawn runners, the cost of having no reporter flag. */
285
229
  export function createSwiftXCTestCollector(options) {
286
230
  const capabilities = computeCapabilities();
287
231
  let managed = null;
@@ -338,9 +282,7 @@ export function createSwiftXCTestCollector(options) {
338
282
  parsed = JSON.parse(line);
339
283
  }
340
284
  catch {
341
- // swift test's own console output ("Test Suite 'X' started at...",
342
- // the swift-testing banner, a compiler diagnostic) -- ordinary
343
- // noise on the same stdout, not a parse failure of this reporter.
285
+ // swift test's own console output/banners/diagnostics on the same stdout -- ordinary noise
344
286
  return;
345
287
  }
346
288
  if (!isNodeTestEvent(parsed)) {
@@ -1 +1 @@
1
- {"version":3,"file":"swift-xctest.js","sourceRoot":"","sources":["../src/swift-xctest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACvF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAuB,MAAM,6BAA6B,CAAC;AAGhF,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,SAAS,EAAE,eAAe,EAAsB,MAAM,4BAA4B,CAAC;AACvI,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAa3D;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,eAAe,CAAC,IAAmB;IACjD,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,MAAM,IAAI,GAAG,CAAC,IAAmB,EAAQ,EAAE;QACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,IAAI,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C,iBAAiB;YACrB,MAAM,UAAU,CAAC;QACnB,CAAC;QAED,aAAa;YACX,OAAO,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;QAClF,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -98,7 +98,7 @@
98
98
  * before a scoped `node --test packages/test-runner/test/*.test.ts` also
99
99
  * works and is faster while iterating on one file.
100
100
  */
101
- import { type ManagedProcess } from "@descryy/runtime-controller";
101
+ import { type ManagedProcess, type ProcessExitInfo } from "@descryy/runtime-controller";
102
102
  import type { Collector, EmitFn, TestRunnerConfiguration } from "@descryy/runtime-contracts";
103
103
  /**
104
104
  * §2 (RT-?): the contracts type, not a look-alike -- `ExecutionConfiguration.testRunner`
@@ -502,6 +502,19 @@ export interface TestRunnerCollector extends Collector {
502
502
  waitForCompletion(): Promise<void>;
503
503
  /** How many observed tests actually carried a `t.diagnostic()`-declared correlation id, against how many were observed at all -- the denominator matters (RT-074): "N correlated" alone reads as full coverage no matter how small N is relative to the real test count. `{testsObserved: 0, idsPresent: 0}` before any result has been observed. */
504
504
  traceCoverage(): TraceCoverage;
505
+ /**
506
+ * How the spawned process actually ended, once it has. `null` before
507
+ * `start()` spawns anything and while it is still running.
508
+ *
509
+ * A recognised runner and a crashing one look identical from
510
+ * `traceCoverage()` alone -- both can report zero results. The
511
+ * difference is here: a suite that legitimately found nothing still
512
+ * exits 0, while a runner that died before producing a single result (a
513
+ * missing module, an import error, an exec failure) does not.
514
+ * `waitForCompletion()` guarantees this is populated by the time it
515
+ * returns, because the process has necessarily already exited by then.
516
+ */
517
+ processExit(): ProcessExitInfo | null;
505
518
  }
506
519
  export declare function createTestRunnerCollector(options: TestRunnerCollectorOptions): TestRunnerCollector;
507
520
  //# sourceMappingURL=test-runner-collector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"test-runner-collector.d.ts","sourceRoot":"","sources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) {
1156
1156
  let managed = null;
1157
1157
  let completion = Promise.resolve();
1158
1158
  let translator = null;
1159
+ let exitInfo = null;
1159
1160
  return {
1160
1161
  collectorId: "test-runner-collector",
1161
1162
  async start(ctx) {
@@ -1190,6 +1191,12 @@ export function createTestRunnerCollector(options) {
1190
1191
  // resolve it (see `RunnerProfile.reporterEnv`'s own doc comment).
1191
1192
  env: { NODE_TEST_CONTEXT: undefined, ...reporterEnvFor(discovery.kind, discovery.args) },
1192
1193
  });
1194
+ // Attached independently of `pumpLines`' own `waitForExit()` -- a
1195
+ // second `.then()` on the same settled-once promise, not a second
1196
+ // spawn or a race with the line pump.
1197
+ void managed.waitForExit().then((info) => {
1198
+ exitInfo = info;
1199
+ });
1193
1200
  translator = createEventTranslator(context.emit, options.service, processId);
1194
1201
  const activeTranslator = translator;
1195
1202
  const gate = createEnvelopeGate();
@@ -1289,6 +1296,9 @@ export function createTestRunnerCollector(options) {
1289
1296
  traceCoverage() {
1290
1297
  return translator?.coverage() ?? { testsObserved: 0, idsPresent: 0, notRun: 0 };
1291
1298
  },
1299
+ processExit() {
1300
+ return exitInfo;
1301
+ },
1292
1302
  };
1293
1303
  }
1294
1304
  //# sourceMappingURL=test-runner-collector.js.map