bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

mach reftest --debugger doesn't work

RESOLVED FIXED in mozilla28

Status

Testing
Reftest
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: heycam, Assigned: Ms2ger)

Tracking

unspecified
mozilla28
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 4 obsolete attachments)

(Reporter)

Description

5 years ago
Same as bug 913173, but for reftest.

master irk:/z/moz/central $ ./mach reftest --debugger=gdb
 0:00.20 /usr/bin/make -C . -j8 -s -w reftest
make: Entering directory `/z/moz/central/obj-mac-dbg'
REFTEST INFO | runreftest.py | Running tests: start.

INFO | automation.py | Launching: /usr/bin/gdb -q --args /z/moz/central/obj-mac-dbg/dist/NightlyDebug.app/Contents/MacOS/firefox-bin -foreground -no-remote -profile /var/folders/04/rtvfhstx5c1_y4sv_179m40c0000gn/T/tmpFHBM2J.mozrunner/ -reftest /z/moz/central/layout/reftests/reftest.list
INFO | automation.py | Application pid: 20356
TEST-INFO: Not logging stdout or stderr due to debugger connection
Reading symbols for shared libraries ......... done
(gdb) r
Starting program: /z/moz/central/obj-mac-dbg/dist/NightlyDebug.app/Contents/MacOS/firefox-bin -foreground -no-remote -profile /var/folders/04/rtvfhstx5c1_y4sv_179m40c0000gn/T/tmpFHBM2J.mozrunner/ -reftest /z/moz/central/layout/reftests/reftest.list
...
Program exited with code 06.
(gdb)
(Reporter)

Comment 1

5 years ago
I tried sticking in something like bug 913173 comment 11 in runreftest.py's buildBrowserEnv but this didn't have any effect.
Created attachment 803185 [details] [diff] [review]
fix --debugger for reftest/mochitest on OS X

I got motivated and did a Mac build and could reproduce the problem (in both reftest and mochitest). This patch fixes the problem.
Assignee: nobody → ted
Attachment #803185 - Flags: review?(jmaher)
Comment on attachment 803185 [details] [diff] [review]
fix --debugger for reftest/mochitest on OS X

Review of attachment 803185 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/tools/reftest/runreftest.py
@@ +107,5 @@
>      )
>      self.copyExtraFilesToProfile(options, profile)
>      return profile
>  
> +  def buildBrowserEnv(self, options, profileDir, debugger):

why are you not setting this to a default value of False as you do in the mochitest runner?
Attachment #803185 - Flags: review?(jmaher) → review+
I didn't think it was necessary since this was the only caller, but I forgot that runtestsremote calls this as well. I'll fix that, thanks!
Oh, actually, I guess nothing does call the reftest version, but I'll fix it just for sanity.
Created attachment 803816 [details] [diff] [review]
fix --debugger for reftest/mochitest on OS X.
Attachment #803185 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/9157ea42ff41
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Backed out for remote test bustage.
https://hg.mozilla.org/integration/fx-team/rev/a23d608fb893
Whiteboard: [fixed-in-fx-team]
Duplicate of this bug: 918404
This patch doesn't seem to fix the problem for me, still can't debug reftests.
You need to apply the patch then rebuild the build/ directory to get automation.py updated. I tested on my Mac and it worked, so I suspect it's just horrible preprocessed Python nonsense.

Comment 12

5 years ago
The patch seems to have rotted, and the naïve manual application of the reject files doesn't seem to produce a viable environment.
Created attachment 809201 [details] [diff] [review]
fix --debugger for reftest/mochitest on OS X.

Rebased to work on top of the Mochitest refactor.
Attachment #803816 - Attachment is obsolete: true
I still need to manually apply this patch to basically every repo I work in, FWIW.
At the summit, Ted promised to land something to make mochitests work with a debugger again.
Flags: needinfo?(ted)
Created attachment 821204 [details] [diff] [review]
fix --debugger for mochitest on OS X.

This patch only touches Mochitest. This should be simpler to land.
Attachment #809201 - Attachment is obsolete: true
*sigh*, that still broke Android tests:
https://tbpl.mozilla.org/?tree=Try&rev=2cd6ba574f2e
Flags: needinfo?(ted)
Can we get some traction here? Manually shuffling this patch around in local trees is a pain (especially because it borks android try pushes), but more importantly, this is mysteriously breaks the experience of any newcomer dev who doesn't know about the workaround.
Flags: needinfo?(ted)
(Assignee)

Comment 19

5 years ago
I'm looking into fixing android
Assignee: ted → Ms2ger
(Assignee)

Comment 20

5 years ago
Created attachment 8334493 [details] [diff] [review]
Patch v2
Attachment #821204 - Attachment is obsolete: true
Attachment #8334493 - Flags: review?(jmaher)
Comment on attachment 8334493 [details] [diff] [review]
Patch v2

Review of attachment 8334493 [details] [diff] [review]:
-----------------------------------------------------------------

this looks to be the right patch.
Attachment #8334493 - Flags: review?(jmaher) → review+
Ms2ger, you are a hero.
Thanks for that, I owe you one.
https://hg.mozilla.org/mozilla-central/rev/9c31c75b81ea
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Flags: needinfo?(ted)
You need to log in before you can comment on or make changes to this bug.