mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-12 11:48:29 +01:00
Answer architecture round 1: 0 🔴, 2 🟡 (0 misread); a RuntimeError fails the run in a 6 GB container, Stryker bumps wait for a hand run, its package is a decision, item 76 names the test-file lists
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { readFileSync } from 'node:fs'
|
||||
import config from './stryker.config.mjs'
|
||||
|
||||
const mutants = Object.values(JSON.parse(readFileSync(config.jsonReporter.fileName, 'utf8')).files).flatMap((file) => file.mutants)
|
||||
const errors = mutants.filter((mutant) => mutant.status === 'RuntimeError').length
|
||||
if (errors > 0) {
|
||||
console.error(`${errors} of ${mutants.length} mutants ended as RuntimeError, so each may hide a survivor`)
|
||||
process.exit(1)
|
||||
}
|
||||
@@ -19,4 +19,4 @@ if [ -z "$mutate" ]; then
|
||||
fi
|
||||
|
||||
leg "install ($node_image)" in_image "$node_image" sh -c 'npm ci --no-audit --no-fund && npm ci --no-audit --no-fund --prefix mutation-tests'
|
||||
leg "mutation tests ($node_image)" in_image "$node_image" mutation-tests/node_modules/.bin/stryker run mutation-tests/stryker.config.mjs --mutate "$mutate"
|
||||
in_image_memory=6g leg "mutation tests ($node_image)" in_image "$node_image" sh -c 'mutation-tests/node_modules/.bin/stryker run mutation-tests/stryker.config.mjs --mutate "$1" && node mutation-tests/check-runtime-errors.mjs' sh "$mutate"
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
export default {
|
||||
// A test file peaks near 2.6 GB: past four workers a 6 GB container kills some, and a killed worker's mutant reads as an error, hiding a survivor.
|
||||
// A test file peaks near 2.6 GB: past four workers run.sh's 6 GB container kills some, and a killed worker's mutant reads as a RuntimeError, which fails the run.
|
||||
concurrency: 4,
|
||||
coverageAnalysis: 'perTest',
|
||||
ignorePatterns: ['/browser-tests', '/converter-comparison', '/dist', '/mutation-tests', '/package-tests'],
|
||||
reporters: ['clear-text', 'progress-append-only'],
|
||||
jsonReporter: { fileName: '/tmp/mutation-report.json' },
|
||||
reporters: ['clear-text', 'json', 'progress-append-only'],
|
||||
tap: { testFiles: ['src/**/*.test.ts'] },
|
||||
tempDirName: '/tmp/stryker',
|
||||
testRunner: 'tap',
|
||||
|
||||
Reference in New Issue
Block a user