Closed
Bug 787116
Opened 13 years ago
Closed 13 years ago
Marionette's printLogs should write to stderr instead of stdout
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla18
People
(Reporter: jgriffin, Assigned: hao)
Details
(Whiteboard: [mentor=mdas][lang=py][good first bug])
Attachments
(1 file)
1.20 KB,
patch
|
jgriffin
:
review+
|
Details | Diff | Splinter Review |
Marionette uses Python's unittest runner to run tests. TextTestRunner outputs test results to stderr, instead of stdout, to avoid the buffering that takes places with stdout.
Marionette's printLogs function (http://mxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/runtests.py#65), on the other hand, just uses print, which goes to stdout. This does get buffered, and the result is, when running a sequence of tests, that the log info does not get printed immediately after a test, as is desired, but sometime later, when the stdout buffer gets flushed.
To fix this, we should have printLogs output to MarionetteTextTestRunner.stream, which by default is sys.stderr.
Assignee | ||
Comment 1•13 years ago
|
||
If I made some changes to the code, how can I verify the result? Run the runtests.py?
Reporter | ||
Comment 2•13 years ago
|
||
(In reply to Hao Gao from comment #1)
> If I made some changes to the code, how can I verify the result? Run the
> runtests.py?
Yes, you can run it with desktop Firefox using a command-line like this:
python runtests.py --address localhost:2828 --binary /path/to/firefox --type browser tests/unit-tests.ini
Reporter | ||
Comment 3•13 years ago
|
||
I should add that in order to get a Firefox build that has Marionette enabled, you should download a debug build from e.g., http://stage.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-central-linux-debug/ (or other, depending on your platform).
Reporter | ||
Comment 5•13 years ago
|
||
Comment on attachment 659003 [details] [diff] [review]
a patch
Review of attachment 659003 [details] [diff] [review]:
-----------------------------------------------------------------
Looks great, thanks for contributing a patch!
Attachment #659003 -
Flags: review?(jgriffin) → review+
Reporter | ||
Comment 6•13 years ago
|
||
Assignee: nobody → haog
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Updated•3 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•