@mizchi/mutator-bun 0.0.0-stage → 0.5.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 +21 -0
- package/dist/config.d.ts +19 -0
- package/dist/config.js +103 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/junit.d.ts +16 -0
- package/dist/junit.js +81 -0
- package/dist/junit.js.map +1 -0
- package/dist/session.d.ts +34 -0
- package/dist/session.js +471 -0
- package/dist/session.js.map +1 -0
- package/package.json +38 -3
- package/src/config.ts +110 -0
- package/src/index.ts +2 -0
- package/src/junit.ts +88 -0
- package/src/preload.js +153 -0
- package/src/session.ts +541 -0
- package/README.md +0 -3
package/dist/session.js
ADDED
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
// Bun session: every dry run and every mutant run is a separate `bun test` process. Bun has no
|
|
2
|
+
// programmatic runner API, but it starts in milliseconds, so a process per run stays cheap.
|
|
3
|
+
// The sources are instrumented once, in this process; a preload serves them to Bun through a
|
|
4
|
+
// runtime plugin. `--isolate` gives each test file a fresh global and module registry, so the
|
|
5
|
+
// preload knows which file ran (Bun.main) and static mutants are attributed to every file that
|
|
6
|
+
// loads them. Test names and verdicts come from Bun's JUnit report.
|
|
7
|
+
import { execFileSync, spawn, spawnSync } from 'node:child_process';
|
|
8
|
+
import { existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs';
|
|
9
|
+
import { availableParallelism, tmpdir } from 'node:os';
|
|
10
|
+
import { extname, join, normalize, resolve } from 'node:path';
|
|
11
|
+
import { fileURLToPath } from 'node:url';
|
|
12
|
+
import { DEFAULT_HIT_LIMIT, HIT_LIMIT_MESSAGE, RunnerSetupError, classifyRun, emptyDryRun, hash, instrument, instrumentFlags, numberDuplicates, portableFlags, testFingerprint, relativePath as relative, } from '@mizchi/mutator-core';
|
|
13
|
+
import { listTestFiles, readBunfig } from './config.js';
|
|
14
|
+
import { parseJunit } from './junit.js';
|
|
15
|
+
// Published builds run from dist/; the preload ships in src/.
|
|
16
|
+
export const PRELOAD = fileURLToPath(new URL(import.meta.url.endsWith('.ts') ? './preload.js' : '../src/preload.js', import.meta.url));
|
|
17
|
+
/** Bun start-up allowance added to every mutant timeout until a run has been measured. */
|
|
18
|
+
const DEFAULT_STARTUP_MS = 2000;
|
|
19
|
+
/** Longest argument passed outside Windows (Linux limits one to 128 KiB); longer name patterns run whole files instead. */
|
|
20
|
+
const MAX_ARG = 32 * 1024;
|
|
21
|
+
/** Windows limits the whole command line, quoted, to this many characters. */
|
|
22
|
+
const MAX_WINDOWS_COMMAND_LINE = 32_767;
|
|
23
|
+
const prepared = new Map();
|
|
24
|
+
/** Numbers plugin objects, so that only sessions given the very same mutators and ignorers share sources. */
|
|
25
|
+
const pluginIds = new WeakMap();
|
|
26
|
+
let nextPluginId = 0;
|
|
27
|
+
function pluginId(plugin) {
|
|
28
|
+
let id = pluginIds.get(plugin);
|
|
29
|
+
if (id === undefined)
|
|
30
|
+
pluginIds.set(plugin, (id = nextPluginId++));
|
|
31
|
+
return id;
|
|
32
|
+
}
|
|
33
|
+
function prepare(options) {
|
|
34
|
+
const plugins = [(options.mutators ?? []).map(pluginId), (options.ignorers ?? []).map(pluginId)];
|
|
35
|
+
const key = JSON.stringify([options.root, [...options.targets].sort(), portableFlags(options), plugins]);
|
|
36
|
+
const shared = prepared.get(key);
|
|
37
|
+
if (shared) {
|
|
38
|
+
shared.refs++;
|
|
39
|
+
return shared;
|
|
40
|
+
}
|
|
41
|
+
const dir = mkdtempSync(join(tmpdir(), 'mutator-bun-'));
|
|
42
|
+
try {
|
|
43
|
+
mkdirSync(join(dir, 'src'));
|
|
44
|
+
const files = [];
|
|
45
|
+
const mutants = [];
|
|
46
|
+
options.targets.forEach((file, i) => {
|
|
47
|
+
const result = instrument(file, readFileSync(file, 'utf8'), { identity: relative(options.root, file), ...instrumentFlags(options) });
|
|
48
|
+
mutants.push(...result.mutants);
|
|
49
|
+
const code = join(dir, 'src', `${i}${extname(file)}`);
|
|
50
|
+
writeFileSync(code, result.code);
|
|
51
|
+
files.push([file, code, loaderOf(file)]);
|
|
52
|
+
});
|
|
53
|
+
const manifest = join(dir, 'manifest.json');
|
|
54
|
+
writeFileSync(manifest, JSON.stringify({ files, filter: pathFilter(options.targets) }));
|
|
55
|
+
const value = { key, dir, manifest, mutants, refs: 1 };
|
|
56
|
+
prepared.set(key, value);
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
rmSync(dir, { recursive: true, force: true });
|
|
61
|
+
throw error;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/** Drops a session's hold on the shared sources; the last one removes them. */
|
|
65
|
+
function release(shared) {
|
|
66
|
+
if (--shared.refs > 0)
|
|
67
|
+
return;
|
|
68
|
+
prepared.delete(shared.key);
|
|
69
|
+
rmSync(shared.dir, { recursive: true, force: true });
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A regex source matching exactly these absolute paths, with either separator (Bun may report
|
|
73
|
+
* Windows paths with `/` or `\`). Grouped by directory: Bun compiles it in every test file,
|
|
74
|
+
* and a flat alternation of whole paths takes tens of milliseconds there in a large project.
|
|
75
|
+
*/
|
|
76
|
+
export function pathFilter(files) {
|
|
77
|
+
const sep = '[\\\\/]';
|
|
78
|
+
const byDir = new Map();
|
|
79
|
+
for (const file of files) {
|
|
80
|
+
const parts = file.split(/[\\/]/).map(escapeRegExp);
|
|
81
|
+
const base = parts.pop();
|
|
82
|
+
const dir = parts.join(sep);
|
|
83
|
+
const bases = byDir.get(dir);
|
|
84
|
+
if (bases)
|
|
85
|
+
bases.push(base);
|
|
86
|
+
else
|
|
87
|
+
byDir.set(dir, [base]);
|
|
88
|
+
}
|
|
89
|
+
return `^(?:${[...byDir].map(([dir, bases]) => `${dir}${sep}(?:${bases.join('|')})`).join('|')})$`;
|
|
90
|
+
}
|
|
91
|
+
/** Bun's loader for a source; Bun's own `.js` loader accepts JSX too. */
|
|
92
|
+
function loaderOf(file) {
|
|
93
|
+
const ext = extname(file);
|
|
94
|
+
if (ext === '.tsx')
|
|
95
|
+
return 'tsx';
|
|
96
|
+
if (ext === '.ts' || ext === '.mts' || ext === '.cts')
|
|
97
|
+
return 'ts';
|
|
98
|
+
return 'jsx';
|
|
99
|
+
}
|
|
100
|
+
const checked = new Map();
|
|
101
|
+
/** Fails with a setup error unless `bin` runs a Bun whose test runner has --isolate. */
|
|
102
|
+
function checkBun(bin, root) {
|
|
103
|
+
let verdict = checked.get(bin);
|
|
104
|
+
if (verdict === undefined) {
|
|
105
|
+
const help = spawnSync(bin, ['test', '--help'], { cwd: root, encoding: 'utf8' });
|
|
106
|
+
if (help.error) {
|
|
107
|
+
verdict = new RunnerSetupError(`mutator: cannot run Bun (${bin}): ${help.error.message}. Install Bun (https://bun.com) or put it on PATH.`);
|
|
108
|
+
}
|
|
109
|
+
else if (!/--isolate\b/.test(`${help.stdout}${help.stderr}`)) {
|
|
110
|
+
const version = spawnSync(bin, ['--version'], { encoding: 'utf8' }).stdout?.trim() || 'unknown';
|
|
111
|
+
verdict = new RunnerSetupError(`mutator: Bun ${version} has no \`bun test --isolate\`; upgrade Bun to use it with mutator.`);
|
|
112
|
+
}
|
|
113
|
+
else
|
|
114
|
+
verdict = 'ok';
|
|
115
|
+
checked.set(bin, verdict);
|
|
116
|
+
}
|
|
117
|
+
if (verdict instanceof Error)
|
|
118
|
+
throw verdict;
|
|
119
|
+
}
|
|
120
|
+
export async function createBunSession(options) {
|
|
121
|
+
const { root } = options;
|
|
122
|
+
const bin = process.versions.bun ? process.execPath : 'bun';
|
|
123
|
+
checkBun(bin, root);
|
|
124
|
+
const bunfig = readBunfig(root, options.configFile);
|
|
125
|
+
const shared = prepare(options);
|
|
126
|
+
let dir;
|
|
127
|
+
try {
|
|
128
|
+
dir = mkdtempSync(join(shared.dir, 'session-'));
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
release(shared);
|
|
132
|
+
throw error;
|
|
133
|
+
}
|
|
134
|
+
const locations = new Map();
|
|
135
|
+
let startupMs = DEFAULT_STARTUP_MS;
|
|
136
|
+
let runs = 0;
|
|
137
|
+
const children = new Set();
|
|
138
|
+
const argvOf = (run, args) => [
|
|
139
|
+
'test',
|
|
140
|
+
'--isolate',
|
|
141
|
+
'--preload',
|
|
142
|
+
PRELOAD,
|
|
143
|
+
'--reporter=junit',
|
|
144
|
+
`--reporter-outfile=${join(dir, `junit-${run}.xml`)}`,
|
|
145
|
+
'--pass-with-no-tests',
|
|
146
|
+
...(options.configFile ? [`--config=${bunfig.path}`] : []),
|
|
147
|
+
...args,
|
|
148
|
+
];
|
|
149
|
+
const bunTest = async (args, env, timeoutMs = Infinity) => {
|
|
150
|
+
const run = runs++;
|
|
151
|
+
const junitFile = join(dir, `junit-${run}.xml`);
|
|
152
|
+
const outDir = join(dir, `out-${run}`);
|
|
153
|
+
mkdirSync(outDir);
|
|
154
|
+
const argv = argvOf(run, args);
|
|
155
|
+
const started = performance.now();
|
|
156
|
+
const child = spawn(bin, argv, {
|
|
157
|
+
cwd: root,
|
|
158
|
+
detached: true,
|
|
159
|
+
// Test output is not read; a test writing megabytes to stdout must not block the run.
|
|
160
|
+
stdio: ['ignore', 'ignore', 'pipe'],
|
|
161
|
+
env: { ...process.env, MUTATOR_BUN_MANIFEST: shared.manifest, MUTATOR_BUN_OUT: outDir, ...env },
|
|
162
|
+
});
|
|
163
|
+
children.add(child);
|
|
164
|
+
let stderr = '';
|
|
165
|
+
child.stderr.on('data', (chunk) => {
|
|
166
|
+
if (stderr.length < 64 * 1024)
|
|
167
|
+
stderr += chunk.toString();
|
|
168
|
+
});
|
|
169
|
+
let timedOut = false;
|
|
170
|
+
const timer = Number.isFinite(timeoutMs)
|
|
171
|
+
? setTimeout(() => {
|
|
172
|
+
timedOut = true;
|
|
173
|
+
killGroup(child);
|
|
174
|
+
}, timeoutMs)
|
|
175
|
+
: undefined;
|
|
176
|
+
const code = await new Promise((done) => {
|
|
177
|
+
child.on('error', (error) => {
|
|
178
|
+
stderr += String(error);
|
|
179
|
+
done(null);
|
|
180
|
+
});
|
|
181
|
+
child.on('close', (exitCode) => done(exitCode));
|
|
182
|
+
});
|
|
183
|
+
clearTimeout(timer);
|
|
184
|
+
// Workers of --parallel are in the same group; make sure none outlives the run.
|
|
185
|
+
killGroup(child);
|
|
186
|
+
children.delete(child);
|
|
187
|
+
let junit;
|
|
188
|
+
try {
|
|
189
|
+
junit = parseJunit(readFileSync(junitFile, 'utf8'));
|
|
190
|
+
}
|
|
191
|
+
catch {
|
|
192
|
+
junit = undefined;
|
|
193
|
+
}
|
|
194
|
+
const found = [];
|
|
195
|
+
for (const name of readdirSync(outDir)) {
|
|
196
|
+
try {
|
|
197
|
+
found.push(JSON.parse(readFileSync(join(outDir, name), 'utf8')));
|
|
198
|
+
}
|
|
199
|
+
catch {
|
|
200
|
+
// A record cut short by a killed process tells nothing.
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
// By file, so that what is derived from them does not depend on the directory order.
|
|
204
|
+
const records = new Map(found.map((r) => [normalize(r.file), r]).sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)));
|
|
205
|
+
rmSync(junitFile, { force: true });
|
|
206
|
+
rmSync(outDir, { recursive: true, force: true });
|
|
207
|
+
return { junit, records, code, timedOut, stderr, wallMs: performance.now() - started };
|
|
208
|
+
};
|
|
209
|
+
const measure = (outcome) => {
|
|
210
|
+
if (!outcome.junit)
|
|
211
|
+
return;
|
|
212
|
+
const testsMs = outcome.junit.flatMap((f) => f.tests).reduce((sum, t) => sum + t.durationMs, 0);
|
|
213
|
+
startupMs = Math.max(500, outcome.wallMs - testsMs);
|
|
214
|
+
};
|
|
215
|
+
return {
|
|
216
|
+
mutants: () => shared.mutants,
|
|
217
|
+
configFiles() {
|
|
218
|
+
return [...new Set([...(bunfig.path ? [bunfig.path] : []), ...bunfig.preload])].filter((f) => existsSync(f)).sort();
|
|
219
|
+
},
|
|
220
|
+
async testFiles() {
|
|
221
|
+
return listTestFiles(bunfig.testRoot ?? root, root, bunfig.ignore);
|
|
222
|
+
},
|
|
223
|
+
async dryRun(files) {
|
|
224
|
+
if (files && files.length === 0)
|
|
225
|
+
return emptyDryRun();
|
|
226
|
+
const count = files?.length ?? Infinity;
|
|
227
|
+
const workers = Math.min(options.maxWorkers ?? availableParallelism(), count);
|
|
228
|
+
const outcome = await bunTest([...(workers > 1 ? [`--parallel=${workers}`] : []), ...(files ?? [])], { MUTATOR_HIT_LIMIT: String(DEFAULT_HIT_LIMIT) });
|
|
229
|
+
if (noOutput(outcome))
|
|
230
|
+
throw new Error(`mutator: bun test wrote no report (exit ${outcome.code})\n${outcome.stderr}`);
|
|
231
|
+
measure(outcome);
|
|
232
|
+
const dry = collectDryRun(outcome, root);
|
|
233
|
+
for (const [id, location] of dry.index)
|
|
234
|
+
locations.set(id, location);
|
|
235
|
+
return dry;
|
|
236
|
+
},
|
|
237
|
+
useTestIndex(index) {
|
|
238
|
+
locations.clear();
|
|
239
|
+
for (const [id, location] of index)
|
|
240
|
+
locations.set(id, location);
|
|
241
|
+
},
|
|
242
|
+
async runMutant(mutantKey, testIds, { timeoutMs, isStatic = false, hitLimit = DEFAULT_HIT_LIMIT, earlyExit = true }) {
|
|
243
|
+
const names = new Set();
|
|
244
|
+
const files = new Set();
|
|
245
|
+
for (const id of testIds) {
|
|
246
|
+
const location = locations.get(id);
|
|
247
|
+
if (!location)
|
|
248
|
+
continue;
|
|
249
|
+
files.add(location.moduleId);
|
|
250
|
+
names.add(location.taskId);
|
|
251
|
+
}
|
|
252
|
+
if (files.size === 0)
|
|
253
|
+
return { status: 'Survived', killedBy: [], durationMs: 0 };
|
|
254
|
+
const run = (filter, bail) => bunTest([...(bail ? ['--bail'] : []), ...filter, ...files], { MUTATOR_ACTIVE: mutantKey, MUTATOR_HIT_LIMIT: String(hitLimit) }, timeoutMs + startupMs);
|
|
255
|
+
// A static mutant runs whole files, as it is active while they load. So does a pattern
|
|
256
|
+
// too long for the command line.
|
|
257
|
+
const pattern = [`--test-name-pattern=^(?:${[...names].map(escapeRegExp).join('|')})$`];
|
|
258
|
+
const filter = isStatic || !fitsCommandLine([bin, ...argvOf(runs, ['--bail', ...pattern, ...files])]) ? [] : pattern;
|
|
259
|
+
let outcome = await run(filter, earlyExit);
|
|
260
|
+
let durationMs = outcome.wallMs;
|
|
261
|
+
// Selected tests that did not run, with none of them failing, run again through their
|
|
262
|
+
// whole files, without --bail. The report drops characters XML cannot hold (NUL and other
|
|
263
|
+
// control characters), so a pattern built from it misses a test named with them. And
|
|
264
|
+
// --bail stops at the first failing test, also one that was not selected, which a
|
|
265
|
+
// whole-file run includes. The rerun gets its own `timeoutMs`, an exception to it being
|
|
266
|
+
// the budget of the whole run: the first run left selected tests out, and running out of
|
|
267
|
+
// a shared budget would count the mutant as detected (Timeout).
|
|
268
|
+
// With early exit, a selected test that failed decides the mutant; without it (kill
|
|
269
|
+
// matrix), every selected test has to run.
|
|
270
|
+
const left = !outcome.timedOut && outcome.junit ? leftOut(outcome, root, testIds, locations) : undefined;
|
|
271
|
+
let first;
|
|
272
|
+
if (left?.missed && !(earlyExit && left.selectedFailed) && (filter.length > 0 || (earlyExit && left.otherFailed))) {
|
|
273
|
+
first = outcome;
|
|
274
|
+
outcome = await run([], false);
|
|
275
|
+
durationMs += outcome.wallMs;
|
|
276
|
+
}
|
|
277
|
+
if (outcome.timedOut)
|
|
278
|
+
return { status: 'Timeout', timeoutCause: 'time', killedBy: [], durationMs };
|
|
279
|
+
// The process died: a mutant calling process.exit, a crash.
|
|
280
|
+
if (noOutput(outcome))
|
|
281
|
+
return { status: 'RuntimeError', killedBy: [], durationMs };
|
|
282
|
+
measure(outcome);
|
|
283
|
+
// A selected test that failed in the first run counts, also when it passes in the rerun.
|
|
284
|
+
const report = runReport(outcome, root, testIds);
|
|
285
|
+
return { ...classifyRun(first ? withFailures(report, runReport(first, root, testIds)) : report), durationMs };
|
|
286
|
+
},
|
|
287
|
+
async close() {
|
|
288
|
+
for (const child of children)
|
|
289
|
+
killGroup(child);
|
|
290
|
+
rmSync(dir, { recursive: true, force: true });
|
|
291
|
+
release(shared);
|
|
292
|
+
},
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
function killGroup(child) {
|
|
296
|
+
if (child.pid === undefined)
|
|
297
|
+
return;
|
|
298
|
+
try {
|
|
299
|
+
if (process.platform === 'win32') {
|
|
300
|
+
if (child.exitCode === null && child.signalCode === null)
|
|
301
|
+
execFileSync('taskkill', ['/pid', String(child.pid), '/t', '/f'], { stdio: 'ignore' });
|
|
302
|
+
}
|
|
303
|
+
else
|
|
304
|
+
process.kill(-child.pid, 'SIGKILL');
|
|
305
|
+
}
|
|
306
|
+
catch {
|
|
307
|
+
// already gone
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
function escapeRegExp(s) {
|
|
311
|
+
return s.replace(/[.*+?^${}()|[\]\\/]/g, '\\$&');
|
|
312
|
+
}
|
|
313
|
+
/** The test ids of a reported file, `#n` numbering repeated full names in report order. */
|
|
314
|
+
function* identify(file, root) {
|
|
315
|
+
const rel = relative(root, resolve(root, file.file));
|
|
316
|
+
const distinct = numberDuplicates();
|
|
317
|
+
for (const test of file.tests)
|
|
318
|
+
yield { id: distinct(`${rel}#${test.fullName}`), test };
|
|
319
|
+
}
|
|
320
|
+
/** Every key of every test's bucket. */
|
|
321
|
+
const union = (buckets) => new Set(Object.values(buckets ?? {}).flatMap((b) => Object.keys(b)));
|
|
322
|
+
/** Local modules a test file loaded (the preload leaves out node_modules): without itself and the preload, existing files only. */
|
|
323
|
+
function localDeps(record, abs, root, exists) {
|
|
324
|
+
const own = new Set([normalize(abs), normalize(PRELOAD)]);
|
|
325
|
+
return (record?.modules ?? [])
|
|
326
|
+
.map((m) => normalize(m))
|
|
327
|
+
.filter((m) => !own.has(m) && exists(m))
|
|
328
|
+
.map((m) => relative(root, m))
|
|
329
|
+
.sort();
|
|
330
|
+
}
|
|
331
|
+
function collectDryRun(outcome, root) {
|
|
332
|
+
const dry = emptyDryRun();
|
|
333
|
+
const infected = new Map();
|
|
334
|
+
const spawns = new Map();
|
|
335
|
+
const credit = (map, keys, id) => {
|
|
336
|
+
for (const key of keys) {
|
|
337
|
+
const ids = map.get(key) ?? [];
|
|
338
|
+
ids.push(id);
|
|
339
|
+
map.set(key, ids);
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
// Test files share most of their dependencies.
|
|
343
|
+
const found = new Map();
|
|
344
|
+
const exists = (file) => found.get(file) ?? found.set(file, existsSync(file)).get(file);
|
|
345
|
+
/** What a test file loaded: its static mutants and local dependencies. */
|
|
346
|
+
const addFile = (abs, record) => {
|
|
347
|
+
const rel = relative(root, abs);
|
|
348
|
+
const fileStatic = new Set(Object.keys(record?.static ?? {}));
|
|
349
|
+
dry.staticByFile.set(rel, fileStatic);
|
|
350
|
+
for (const key of fileStatic)
|
|
351
|
+
dry.staticKeys.add(key);
|
|
352
|
+
dry.deps.set(rel, localDeps(record, abs, root, exists));
|
|
353
|
+
};
|
|
354
|
+
const reported = new Set();
|
|
355
|
+
for (const file of outcome.junit ?? []) {
|
|
356
|
+
const abs = normalize(resolve(root, file.file));
|
|
357
|
+
reported.add(abs);
|
|
358
|
+
const record = outcome.records.get(abs);
|
|
359
|
+
addFile(abs, record);
|
|
360
|
+
for (const [key, n] of Object.entries(record?.counts ?? {}))
|
|
361
|
+
dry.hits.set(key, (dry.hits.get(key) ?? 0) + n);
|
|
362
|
+
const executed = file.tests.filter((t) => t.state !== 'skipped').length;
|
|
363
|
+
// Tests are paired with the preload's numbers in order; when that cannot be trusted,
|
|
364
|
+
// every test of the file is credited with all of the file's hits.
|
|
365
|
+
const aligned = record !== undefined && !record.overlap && record.tests === executed;
|
|
366
|
+
const allHits = aligned ? undefined : union(record?.perTest);
|
|
367
|
+
const allInfected = aligned ? undefined : union(record?.infected);
|
|
368
|
+
const fingerprint = hash(readFileSync(abs, 'utf8'));
|
|
369
|
+
let slot = 0;
|
|
370
|
+
for (const { id, test } of identify(file, root)) {
|
|
371
|
+
dry.index.set(id, { moduleId: abs, taskId: test.fullName });
|
|
372
|
+
if (test.state === 'skipped')
|
|
373
|
+
continue;
|
|
374
|
+
const n = String(slot++);
|
|
375
|
+
if (test.state === 'failed')
|
|
376
|
+
dry.failed.push(id);
|
|
377
|
+
const info = { id, fingerprint: testFingerprint(fingerprint, id), durationMs: test.durationMs };
|
|
378
|
+
dry.tests.push(info);
|
|
379
|
+
credit(dry.coverage, allHits ?? Object.keys(record?.perTest?.[n] ?? {}), id);
|
|
380
|
+
credit(infected, allInfected ?? Object.keys(record?.infected?.[n] ?? {}), id);
|
|
381
|
+
const spawned = aligned ? record?.spawns?.[n] : Object.values(record?.spawns ?? {}).flat();
|
|
382
|
+
if (spawned?.length)
|
|
383
|
+
spawns.set(id, spawned);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
// Files with no tests in the report: those that failed to load, and those without tests.
|
|
387
|
+
for (const [file, record] of outcome.records) {
|
|
388
|
+
if (reported.has(file))
|
|
389
|
+
continue;
|
|
390
|
+
if (!record.loaded)
|
|
391
|
+
dry.failed.push(relative(root, file));
|
|
392
|
+
addFile(file, record);
|
|
393
|
+
}
|
|
394
|
+
if (dry.failed.length === 0 && outcome.code !== 0)
|
|
395
|
+
dry.failed.push(exitError(outcome));
|
|
396
|
+
return { ...dry, infected, spawns };
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* The process died before Bun wrote its report. Bun writes none when no file loaded, but the
|
|
400
|
+
* preload has recorded each of those files; a record of a file that loaded means a later
|
|
401
|
+
* file ended the process (a mutant calling process.exit, a crash).
|
|
402
|
+
*/
|
|
403
|
+
function noOutput(outcome) {
|
|
404
|
+
return !outcome.junit && (outcome.records.size === 0 || [...outcome.records.values()].some((r) => r.loaded));
|
|
405
|
+
}
|
|
406
|
+
/** `bun test` failed outside any test; with the first error line of its output. */
|
|
407
|
+
function exitError(outcome) {
|
|
408
|
+
const line = outcome.stderr.split('\n').find((l) => /^\s*(?:error|\w*Error):/.test(l));
|
|
409
|
+
return `bun test exited with code ${outcome.code}${line ? `: ${line.trim()}` : ''}`;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* For a run in which every file loaded: whether it left out some of the selected tests, and
|
|
413
|
+
* whether a selected test, and a test that was not selected, failed.
|
|
414
|
+
*/
|
|
415
|
+
function leftOut(outcome, root, testIds, locations) {
|
|
416
|
+
if ([...outcome.records.values()].some((r) => !r.loaded))
|
|
417
|
+
return undefined;
|
|
418
|
+
const selected = new Set(testIds);
|
|
419
|
+
const ran = new Set();
|
|
420
|
+
let selectedFailed = false;
|
|
421
|
+
let otherFailed = false;
|
|
422
|
+
for (const file of outcome.junit ?? []) {
|
|
423
|
+
for (const { id, test } of identify(file, root)) {
|
|
424
|
+
if (test.state === 'skipped')
|
|
425
|
+
continue;
|
|
426
|
+
ran.add(id);
|
|
427
|
+
if (test.state !== 'failed')
|
|
428
|
+
continue;
|
|
429
|
+
if (selected.has(id))
|
|
430
|
+
selectedFailed = true;
|
|
431
|
+
else
|
|
432
|
+
otherFailed = true;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
return { missed: testIds.some((id) => locations.has(id) && !ran.has(id)), selectedFailed, otherFailed };
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* `report` with the failures of selected tests in `earlier` added: a test may fail in both
|
|
439
|
+
* runs in different ways (an assertion, then the hit limit), and each failure counts.
|
|
440
|
+
*/
|
|
441
|
+
export function withFailures(report, earlier) {
|
|
442
|
+
return { ...report, tests: [...report.tests, ...earlier.tests.filter((t) => t.failed && report.selected.has(t.id))] };
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Whether a command line is short enough to start. Windows limits the whole line, with each
|
|
446
|
+
* argument quoted (its quotes and backslashes escaped) and separated by a space; elsewhere one
|
|
447
|
+
* argument stays within MAX_ARG.
|
|
448
|
+
*/
|
|
449
|
+
export function fitsCommandLine(argv, platform = process.platform) {
|
|
450
|
+
if (platform !== 'win32')
|
|
451
|
+
return argv.every((arg) => arg.length <= MAX_ARG);
|
|
452
|
+
return argv.reduce((n, arg) => n + arg.length + (arg.match(/["\\]/g)?.length ?? 0) + 3, 0) <= MAX_WINDOWS_COMMAND_LINE;
|
|
453
|
+
}
|
|
454
|
+
/** The run as classifyRun reads it. */
|
|
455
|
+
function runReport(outcome, root, testIds) {
|
|
456
|
+
const tests = [];
|
|
457
|
+
for (const file of outcome.junit ?? []) {
|
|
458
|
+
for (const { id, test } of identify(file, root))
|
|
459
|
+
tests.push({ id, failed: test.state === 'failed', messages: test.messages });
|
|
460
|
+
}
|
|
461
|
+
// A file that failed to load is missing from the report; the preload's record tells.
|
|
462
|
+
const fileErrors = [];
|
|
463
|
+
for (const [file, record] of outcome.records) {
|
|
464
|
+
if (!record.loaded)
|
|
465
|
+
fileErrors.push({ file: relative(root, file), message: record.hitLimit ? HIT_LIMIT_MESSAGE : 'failed to load' });
|
|
466
|
+
}
|
|
467
|
+
// Bun exits non-zero without a failed test or file for an error between tests.
|
|
468
|
+
const runErrors = outcome.code !== 0 && !tests.some((t) => t.failed) && fileErrors.length === 0 ? [exitError(outcome)] : [];
|
|
469
|
+
return { tests, fileErrors, runErrors, selected: new Set(testIds) };
|
|
470
|
+
}
|
|
471
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,4FAA4F;AAC5F,6FAA6F;AAC7F,8FAA8F;AAC9F,+FAA+F;AAC/F,oEAAoE;AACpE,OAAO,EAAqB,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,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/package.json
CHANGED
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mizchi/mutator-bun",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Bun test runner adapter for @mizchi/mutator-core (experimental)",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"mutation-testing",
|
|
8
|
+
"bun"
|
|
9
|
+
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"author": "mizchi",
|
|
12
|
+
"homepage": "https://github.com/mizchi/mutator#readme",
|
|
13
|
+
"bugs": "https://github.com/mizchi/mutator/issues",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/mizchi/mutator.git",
|
|
17
|
+
"directory": "packages/bun"
|
|
18
|
+
},
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"default": "./dist/index.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"src"
|
|
28
|
+
],
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=24"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@mizchi/mutator-core": "0.5.0"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsc -p tsconfig.build.json"
|
|
40
|
+
}
|
|
6
41
|
}
|