Closed Bug 678120 Opened 13 years ago Closed 13 years ago

Browser-chrome mochitests should give a stacktrace on failures

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla9

People

(Reporter: Unfocused, Assigned: Unfocused)

Details

(Whiteboard: [fixed-in-fx-team])

Attachments

(1 file)

Trying to find out whats happening in a failing browser-chrome test can be annoying. A stacktrace can help.
Had this sitting in my patchqueue for awhile, and have found it very useful.

No idea what this could potentially break.
Assignee: nobody → bmcbride
Status: NEW → ASSIGNED
Attachment #552290 - Flags: review?(ted.mielczarek)
Comment on attachment 552290 [details] [diff] [review]
[checked-in] Patch v1

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

As long as it doesn't blow anything up it seems fine to me.

::: testing/mochitest/browser-test.js
@@ +341,5 @@
> +      this.msg += "\nStack trace:\n";
> +      var frame = aStack;
> +      while (frame) {
> +        this.msg += "    " + frame + "\n";
> +        frame = frame.caller;

In practice, do you need the whole stack, or could we just present the top few frames? Perhaps in case of failure it's better to err on the side of more information than less?
Attachment #552290 - Flags: review?(ted.mielczarek) → review+
(In reply to Ted Mielczarek [:ted, :luser] from comment #2)
> In practice, do you need the whole stack, or could we just present the top
> few frames? Perhaps in case of failure it's better to err on the side of
> more information than less?

In practice, there's no way to tell ahead of time how much of the stack you'll need. So yes, much better to have more info than not enough, IMO.

Have ran this through Try several times with other patches that produced test failures, and everything has worked well.

https://hg.mozilla.org/integration/fx-team/rev/2470993f6287
Flags: in-testsuite-
Whiteboard: [fixed-in-fx-team]
Comment on attachment 552290 [details] [diff] [review]
[checked-in] Patch v1

http://hg.mozilla.org/mozilla-central/rev/2470993f6287
Attachment #552290 - Attachment description: Patch v1 → [checked-in] Patch v1
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: