Closed Bug 1094526 Opened 10 years ago Closed 10 years ago

[mozlog] xpcshell-test PROCESS_OUTPUT contains extra newlines

Categories

(Testing :: Mozbase, defect)

defect
Not set
normal
Points:
1

Tracking

(Not tracked)

RESOLVED FIXED
mozilla36
Iteration:
36.2

People

(Reporter: markh, Assigned: markh)

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

Attached patch t.patch (obsolete) — Splinter Review
If you run xpcshell tests that generate "process output", the output looks like:

0:01.27 PROCESS_OUTPUT: Thread-1 (pid:13600) "1415236493351	addons.manager	DEBUG	Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"]
"
 0:01.27 PROCESS_OUTPUT: Thread-1 (pid:13600) "1415236493351	addons.manager	DEBUG	Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"]
"

(which might be hard to see if bugzilla wraps the line, but each output line looks like '... "an output line\n"\n' - ie, every line of output includes the raw \n (\r\n on Windows) character from the process output, then a close quote and additional \n added by the test harness.

With the following patch applied the output becomes:

0:01.24 PROCESS_OUTPUT: Thread-1 (pid:15216) "1415236662103	addons.manager	DEBUG	Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"]"
 0:01.24 PROCESS_OUTPUT: Thread-1 (pid:15216) "1415236662103	addons.manager	DEBUG	Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"]"

Chris, does this patch make sense, or should it be handled elsewhere?

(In-fact, I'd prefer to see it look something like:
0:01.24 PROCESS_OUTPUT: Thread-1 (pid:15216):   141523....

(ie, a ':\t' instead of the open quote and no closing quote, but that might be more controversial)
Attachment #8517834 - Flags: feedback?(cmanchester)
Comment on attachment 8517834 [details] [diff] [review]
t.patch

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

I'm all for it, but I think I'd err on the side of doing this in the producer, somewhere around http://hg.mozilla.org/mozilla-central/file/2114ef80f6ae/testing/xpcshell/runxpcshelltests.py#l492
Attachment #8517834 - Flags: feedback?(cmanchester) → feedback+
SGTM!
Attachment #8517834 - Attachment is obsolete: true
Attachment #8517850 - Flags: review?(cmanchester)
Attachment #8517850 - Flags: review?(cmanchester) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/f79e13de65b0
Assignee: nobody → mhammond
Status: NEW → ASSIGNED
Points: --- → 1
Flags: firefox-backlog+
Whiteboard: [qa-]
https://hg.mozilla.org/mozilla-central/rev/f79e13de65b0
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Iteration: --- → 36.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: