testing: misc work on test coverage (#201758)

- Allow coverage bar color thresholds to be configurable as the Java
  folks requested.
- Update some of our scripts for integration into
  the selfhost test runner.
- Initial parts of showing function coverage in the Test Coverage view.
  (Still a work in progress, more tomorrow)
This commit is contained in:
Connor Peet
2024-01-03 23:42:22 -08:00
committed by GitHub
parent 95c1e5236a
commit c016ce64fb
13 changed files with 362 additions and 131 deletions

View File

@@ -23,7 +23,7 @@ const { takeSnapshotAndCountClasses } = require('../analyzeSnapshot');
*/
const args = minimist(process.argv.slice(2), {
boolean: ['build', 'coverage', 'help'],
string: ['run'],
string: ['run', 'coveragePath'],
alias: {
h: 'help'
},
@@ -36,6 +36,7 @@ const args = minimist(process.argv.slice(2), {
build: 'Run from out-build',
run: 'Run a single file',
coverage: 'Generate a coverage report',
coveragePath: 'Path to coverage report to generate',
help: 'Show help'
}
});
@@ -141,7 +142,7 @@ function main() {
if (code !== 0) {
return;
}
coverage.createReport(args.run || args.runGlob);
coverage.createReport(args.run || args.runGlob, args.coveragePath);
});
}