@descryy/runtime-test-runner 0.2.1 → 0.4.0
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.
- package/LICENSE +6 -0
- package/dist/collector-version.d.ts +2 -6
- package/dist/collector-version.d.ts.map +1 -1
- package/dist/collector-version.js +2 -6
- package/dist/collector-version.js.map +1 -1
- package/dist/go-test.d.ts +24 -50
- package/dist/go-test.d.ts.map +1 -1
- package/dist/go-test.js +30 -68
- package/dist/go-test.js.map +1 -1
- package/dist/graph-mapping.d.ts +10 -28
- package/dist/graph-mapping.d.ts.map +1 -1
- package/dist/graph-mapping.js +16 -43
- package/dist/graph-mapping.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/jest-reporter.d.ts +20 -46
- package/dist/jest-reporter.d.ts.map +1 -1
- package/dist/jest-reporter.js +28 -71
- package/dist/jest-reporter.js.map +1 -1
- package/dist/playwright-reporter.d.ts +16 -34
- package/dist/playwright-reporter.d.ts.map +1 -1
- package/dist/playwright-reporter.js +22 -51
- package/dist/playwright-reporter.js.map +1 -1
- package/dist/reporter.d.ts +7 -19
- package/dist/reporter.d.ts.map +1 -1
- package/dist/reporter.js +18 -52
- package/dist/reporter.js.map +1 -1
- package/dist/swift-xctest.d.ts +40 -94
- package/dist/swift-xctest.d.ts.map +1 -1
- package/dist/swift-xctest.js +47 -105
- package/dist/swift-xctest.js.map +1 -1
- package/dist/test-runner-collector.d.ts +139 -2
- package/dist/test-runner-collector.d.ts.map +1 -1
- package/dist/test-runner-collector.js +322 -42
- package/dist/test-runner-collector.js.map +1 -1
- package/dist/vitest-reporter.d.ts +19 -43
- package/dist/vitest-reporter.d.ts.map +1 -1
- package/dist/vitest-reporter.js +30 -82
- package/dist/vitest-reporter.js.map +1 -1
- package/package.json +11 -6
package/dist/swift-xctest.d.ts
CHANGED
|
@@ -1,71 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Swift
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
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
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
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
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
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
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
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
|
-
/**
|
|
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
|
|
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
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
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
|
-
/**
|
|
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
|
|
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
|
|
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
|
|
1
|
+
{"version":3,"file":"swift-xctest.d.ts","source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BAAgB,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"}
|
package/dist/swift-xctest.js
CHANGED
|
@@ -1,71 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Swift
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
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
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
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
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
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
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
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
|
|
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
|
-
/**
|
|
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
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
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
|
-
/**
|
|
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
|
|
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
|
|
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)) {
|
package/dist/swift-xctest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swift-xctest.js","sourceRoot":"","sources":["../src/swift-xctest.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"swift-xctest.js","sourceRoot":"","sources":["../src/swift-xctest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SA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