Closed Bug 1055679 Opened 11 years ago Closed 11 years ago

Moztest's unittest adapter should log stacks and messages separately

Categories

(Testing :: Mozbase, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla34

People

(Reporter: chmanchester, Assigned: chmanchester)

References

Details

Attachments

(2 files, 2 obsolete files)

This will make formatting in a tbpl starrable way less brittle and make marionette's special formatter obsolete.
Try (seeded failures): https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=71f776088afb I think I'm ending up with too many newlines somewhere.
This makes the tbpl and mach formatters include stacks in test_end.
Attachment #8475458 - Flags: review?(james)
Assignee: nobody → cmanchester
Status: NEW → ASSIGNED
This modifies the unittest adapter to log messages and stack seperately. The traceback api is a little cryptic, but this seems to produce the expected output.
Attachment #8475461 - Flags: review?(james)
Finally, this removes the one off formatter from marionette altogether.
Attachment #8475463 - Flags: review?(james)
Attachment #8475458 - Flags: review?(james) → review+
Attachment #8475461 - Flags: review?(james) → review+
Attachment #8475463 - Flags: review?(james) → review+
This looks good to me. I briefly looked at the output in treeherder and it seemed OK, but I assume you will post a corrected patch if you spot any problems I missed.
This is the mozlog/moztest patches folded together, the marionette part is unchanged and might need to land after. Two details I noticed and fixed: I was missing the "Traceback (most recent call last):" header we all know and love. The idea of putting the message before the stacktrace is specific to the tbplformatter, the stack before the message gets us what I think we want in the machformatter. The treeherder output looked mostly fine before, but here's a before/after for good measure: Before: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=8f25c9674672 After: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=c175c76d9bee
Attachment #8476188 - Flags: review?(james)
Attachment #8475461 - Attachment is obsolete: true
Attachment #8475458 - Attachment is obsolete: true
Attachment #8476188 - Flags: review?(james) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: