Closed Bug 483100 Opened 15 years ago Closed 15 years ago

Python output buffering makes xpcshell test output not-real-time

Categories

(Testing :: XPCShell Harness, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: Waldo, Assigned: Waldo)

References

Details

(Keywords: autotest-issue, fixed1.9.1, Whiteboard: [fixed1.9.1b99])

Attachments

(1 file, 1 obsolete file)

Attached patch PYTHONUNBUFFERED=1 (obsolete) — Splinter Review
make -s -C obj-i386-apple-darwin8.11.1/netwerk/test/httpserver/ check

prints all output when it completes;

PYTHONUNBUFFERED=1 make -s -C obj-i386-apple-darwin8.11.1/netwerk/test/httpserver/ check

prints each test line incrementally.

There's probably a better way, but this works and is the path of least resistance going forward.
Attachment #367135 - Flags: review?(ted.mielczarek)
That's gross. There are a couple of nicer suggestions here:
http://stackoverflow.com/questions/107705/python-output-buffering
1) stick -u in the hash-bang line at the top of the file
2) sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) (goofy reopening of stdout)

I think the former is less crappy.
#1 doesn't work, that's a comment in Python.  #2, are you serious?  That's worse than the envvar hack.  :-P
Attachment #367135 - Attachment is obsolete: true
Attachment #367289 - Flags: review?(ted.mielczarek)
Attachment #367135 - Flags: review?(ted.mielczarek)
Attachment #367289 - Flags: review?(ted.mielczarek) → review+
Comment on attachment 367289 [details] [diff] [review]
Put -u in the commandline
[Checkin: Comment 4+6 & 5+6]

Just stick it on the same line as $(PYTHON), please.
http://hg.mozilla.org/mozilla-central/rev/33e97515dbe4
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Comment on attachment 367289 [details] [diff] [review]
Put -u in the commandline
[Checkin: Comment 4+6 & 5+6]


http://hg.mozilla.org/releases/mozilla-1.9.1/rev/cdbaf73dd150

After fixing context for
{
patching file config/rules.mk
Hunk #1 FAILED at 140
1 out of 1 hunks FAILED
}
because of bugs landing in a different order :-/
Attachment #367289 - Attachment description: Put -u in the commandline → Put -u in the commandline [Checkin: Comment 4 & 5]
Keywords: fixed1.9.1
Whiteboard: [fixed1.9.1b5]
Version: unspecified → Trunk
Comment on attachment 367289 [details] [diff] [review]
Put -u in the commandline
[Checkin: Comment 4+6 & 5+6]


Argh!

http://hg.mozilla.org/mozilla-central/rev/e950b40cdc8d

***

http://hg.mozilla.org/releases/mozilla-1.9.1/rev/6550db3cac1f

After fixing context for
{
patching file js/src/config/rules.mk
Hunk #1 FAILED at 140
1 out of 1 hunks FAILED
}
because of bugs landing in a different order :-/
Attachment #367289 - Attachment description: Put -u in the commandline [Checkin: Comment 4 & 5] → Put -u in the commandline [Checkin: Comment 4+6 & 5+6]
Whiteboard: [fixed1.9.1b5] → [fixed1.9.1b99]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: