Closed Bug 1956843 Opened 1 year ago Closed 1 year ago

"./mach test <path to xpcshell test file> --profiler" should work

Categories

(Testing :: XPCShell Harness, enhancement)

enhancement

Tracking

(firefox138 fixed)

RESOLVED FIXED
138 Branch
Tracking Status
firefox138 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

Since bug 1628073, ./mach test <path to mochitests> --profiler opens a profiler tab in the default browser at the end of the test execution, which is very convenient to see what a test is doing, and debug failures.

Currently this doesn't work for xpcshell tests, and the best workaround is: MOZ_PROFILER_STARTUP=1 MOZ_PROFILER_SHUTDOWN="$(pwd)/xp.json" ./mach test <path to xpcshell test> ; samply load xp.json.

I think it would be easy to support xpcshell as well for the case of running a single test, which is what is the most needed to help debugging a test failure. Profiling multiple xpcshell tests requires more effort (as we would need to generate multiple separate profile files, and merge them somehow).

Pushed by fqueze@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/288214207743 `./mach test <path to xpcshell test file> --profiler` should work, r=jmaher.
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: