Closed
Bug 1270507
Opened 8 years ago
Closed 8 years ago
[mozlog] Allow more compact output from tbpl logger (skipping expected results for subtests)
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(firefox49 fixed)
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: jgraham, Unassigned)
Details
Attachments
(1 file)
Tests with lots of subtests can be problematic for treeherder as they can blow through the 50Mb log limit. The problem can mostly be avoided by restricting te amount of logging we do for tests that pass.
Reporter | ||
Comment 1•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/50801/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/50801/
Attachment #8749190 -
Flags: review?(ahalberstadt)
Reporter | ||
Comment 2•8 years ago
|
||
https://reviewboard.mozilla.org/r/50801/#review47493 ::: testing/mozbase/mozlog/mozlog/formatters/tbplformatter.py:9 (Diff revision 1) > > from .base import BaseFormatter > from .process import strstatus > > > +class CircularBuffer(object): This is somewhat similar to the way that mochitest's buffering works, but doesn't require any cooperation from the test harness. If you think it's worthwhile, it may be possible to share more of the implementations.
Comment 3•8 years ago
|
||
Comment on attachment 8749190 [details] MozReview Request: Bug 1270507 - Elide subtest results from web-platform-tests on treeherder when they match expectations, r=ahal https://reviewboard.mozilla.org/r/50801/#review47739 ::: testing/mozbase/mozlog/mozlog/commandline.py:70 (Diff revision 1) > + 'compact': (compact_wrapper, > + "Enables compact mode for the given formatter.", > + ["tbpl"], "store_true"), > 'level': (level_filter_wrapper, I think this could replace `--quiet` in mochitest, which basically does the same thing. Though I guess then only the tbpl formatter would be supported. ::: testing/mozbase/mozlog/mozlog/formatters/tbplformatter.py:9 (Diff revision 1) > +class CircularBuffer(object): > + def __init__(self, capacity): > + self.capacity = capacity > + self.data = [None] * self.capacity > + self.index = -1 > + self.full = False You can use `collections.deque(maxlen=capacity)` instead. ::: testing/mozbase/mozlog/mozlog/formatters/tbplformatter.py:41 (Diff revision 1) > + def inner(self, data): > + if self.subtests_count: > + return self._format_subtests(data.get("component")) + func(self, data) > + else: > + return func(self, data) > + inner.__name__ = func.__name__ > + inner.__doc__ = func.__doc__ You can use `@functools.wraps` on `inner` instead of copying `__name__` and `__doc__`.
Attachment #8749190 -
Flags: review?(ahalberstadt)
Comment 4•8 years ago
|
||
Comment on attachment 8749190 [details] MozReview Request: Bug 1270507 - Elide subtest results from web-platform-tests on treeherder when they match expectations, r=ahal https://reviewboard.mozilla.org/r/50801/#review47743 Meant to say r+ with the issues fixed.
Attachment #8749190 -
Flags: review+
Reporter | ||
Comment 5•8 years ago
|
||
Comment on attachment 8749190 [details] MozReview Request: Bug 1270507 - Elide subtest results from web-platform-tests on treeherder when they match expectations, r=ahal Review request updated; see interdiff: https://reviewboard.mozilla.org/r/50801/diff/1-2/
Comment 7•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0a8415939522
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•