Closed Bug 1092217 Opened 6 years ago Closed 6 years ago

Allow debugging gtests via mach


(Firefox Build System :: Mach Core, enhancement)

Not set


(Not tracked)



(Reporter: kats, Assigned: kats)



(1 file, 1 obsolete file)

Running gtests under a debugger is kind of a pain since there's all these hidden env variables and stuff that happens under the hood when you run |mach gtest|. I would like to add a --debug option to the gtest command so that it automatically runs the exact same thing but under the debugger.
Attached patch Patch (obsolete) — Splinter Review
Attachment #8515068 - Flags: review?(gps)
Comment on attachment 8515068 [details] [diff] [review]

Review of attachment 8515068 [details] [diff] [review]:

Someone else needs to review the mozdebug patch, as I'm not a peer there. You'd have to look at commit history to see who a peer is.
Attachment #8515068 - Flags: review?(gps)
Attachment #8515068 - Flags: review?(ted)
Comment on attachment 8515068 [details] [diff] [review]

Review of attachment 8515068 [details] [diff] [review]:

Sorry for the review delay.

I think we should drop the mozdebug part of this patch and just leave that junk in the gtest command for now. I hate everything about the gtest mach command, it needs to die and just call into At that point we can just pass the debug_args right into mozrunner which is what all the other harnesses do.

::: python/mozbuild/mozbuild/
@@ +653,5 @@
> +    @CommandArgument('--debug', action='store_true', group='debugging',
> +        help='Enable the debugger. Not specifying a --debugger option will result in the default debugger being used. The following arguments have no effect without this.')
> +    @CommandArgument('--debugger', default=None, type=str, group='debugging',
> +        help='Name of debugger to use.')
> +    @CommandArgument('--debugparams', default=None, metavar='params', type=str,

This sucks, in that all the other test harnesses call it --debugger-args:

...but I guess mach run calls it debugparams? I'd go with consistency with the other testing commands for now, maybe we can change mach run to match even though breaking people's expectations sucks.
Attachment #8515068 - Flags: review?(ted) → review-
Attached patch Patch v2Splinter Review
Attachment #8515068 - Attachment is obsolete: true
Attachment #8527224 - Flags: review?(ted)
Comment on attachment 8527224 [details] [diff] [review]
Patch v2

Review of attachment 8527224 [details] [diff] [review]:

Attachment #8527224 - Flags: review?(ted) → review+
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.