Closed Bug 914925 Opened 11 years ago Closed 11 years ago

mach reftest --debugger doesn't work


(Testing :: Reftest, defect)

Not set


(Not tracked)



(Reporter: heycam, Assigned: Ms2ger)




(1 file, 4 obsolete files)

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 | | Running tests: start.

INFO | | Launching: /usr/bin/gdb -q --args /z/moz/central/obj-mac-dbg/dist/ -foreground -no-remote -profile /var/folders/04/rtvfhstx5c1_y4sv_179m40c0000gn/T/tmpFHBM2J.mozrunner/ -reftest /z/moz/central/layout/reftests/reftest.list
INFO | | 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/ -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.
I tried sticking in something like bug 913173 comment 11 in's buildBrowserEnv but this didn't have any effect.
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/
@@ +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.
Attachment #803185 - Attachment is obsolete: true
Backed out for remote test bustage.
Whiteboard: [fixed-in-fx-team]
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 updated. I tested on my Mac and it worked, so I suspect it's just horrible preprocessed Python nonsense.
The patch seems to have rotted, and the naïve manual application of the reject files doesn't seem to produce a viable environment.
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)
This patch only touches Mochitest. This should be simpler to land.
Attachment #809201 - Attachment is obsolete: true
*sigh*, that still broke Android tests:
Flags: needinfo?(ted)
Blocks: 934040
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)
I'm looking into fixing android
Assignee: ted → Ms2ger
Attached patch Patch v2Splinter Review
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, thank you!
Ms2ger, you are a hero.
Thanks for that, I owe you one.
Closed: 11 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.