Skip to content

test_runner: improve code coverage cleanup

The test runner's code coverage leaves old coverage data in the temp directory. This commit updates the cleanup logic to:

  • Stop code collection. Otherwise V8 would write collection data again when the process exits.
  • Remove the temp directory containing the coverage data.
  • Attempt to clean up the coverage data even if parsing the data resulted in an error.

With this change, I no longer see any coverage data left behind in the system temp directory.

Refs: https://github.com/nodejs/build/issues/3864 Refs: https://github.com/nodejs/build/issues/3887

Merge request reports

Loading