Determine whether JSDCov coverage collector should be finalized after each manifest or all tests.

NEW
Unassigned

Status

enhancement
2 years ago
11 months ago

People

(Reporter: sparky, Unassigned)

Tracking

(Blocks 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

We've recently found that the mochitest-bc JSDCov run has the coverageCollector call finalize() after each manifest although the documentation for finalize() states that it should be run after all the tests have completed [1]. We need to determine if we should run it after each manifest or after all the manifests (all the tests) have completed.

[1]: https://dxr.mozilla.org/mozilla-central/source/testing/modules/CoverageUtils.jsm#224
Hi :chamanchester, would you be able to tell us whether this comment ([1] above) states that finalize() should be run after each manifest or after all the manifests (all the tests)?
Flags: needinfo?(cmanchester)
My recollection (some years old now) is that I added to prevent memory leaks when shutting down the browser. So it should happen at the end of whatever corresponds to a browser instance: if we're running the browser once per manifest, then at the end of the manifest, if once per directory or chunk, etc, at the end of that.
Flags: needinfo?(cmanchester)
Great, thanks for the insight :chmanchester. I'll go through and make sure that this is the case for each of the suites we are currently running. (I might change the comment at the end of CoverageUtils.jsm also to reflect this).
The linux64-jsdcov build has been disabled, and no longer runs in taskcluster, see bug 1496791. Although the tooling still exists so that it can be done locally so I will leave this issue open.
See Also: → 1496791
You need to log in before you can comment on or make changes to this bug.