[mozlog] Be less verbose in TBPL Formatter when a test was expected to PASS

RESOLVED FIXED in mozilla34

Status

Testing
Mozbase
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jgraham, Assigned: jgraham)

Tracking

unspecified
mozilla34
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

4 years ago
In the case of TEST-UNEXPECTED-* we currently always print a line containing

TEST-INFO expected STATUS

For many testsuites, STATUS will always be PASS, so this is regarded as noise. For cases where it isn't e.g. w-p-t it might be OK to regard PASS as the default and only print the expected status if it's something different (obviously we'll have to see if this is itself confusing).
(Assignee)

Comment 1

4 years ago
Created attachment 8476537 [details] [diff] [review]
Only print line with expected status in tbpl logs when this isn't PASS
Attachment #8476537 - Flags: review?(cmanchester)
Comment on attachment 8476537 [details] [diff] [review]
Only print line with expected status in tbpl logs when this isn't PASS

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

::: testing/mozbase/mozlog/mozlog/structured/formatters/tbplformatter.py
@@ +79,1 @@
>              return "\n".join([failure_line, info_line])

info_line is not always defined now.
Attachment #8476537 - Flags: review?(cmanchester) → review-
(Assignee)

Comment 3

4 years ago
Created attachment 8476717 [details] [diff] [review]
Only print line with expected status in tbpl logs when this isn't PASS
Attachment #8476717 - Flags: review?(cmanchester)
Comment on attachment 8476717 [details] [diff] [review]
Only print line with expected status in tbpl logs when this isn't PASS

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

::: testing/mozbase/mozlog/mozlog/structured/formatters/tbplformatter.py
@@ +77,5 @@
> +            if data["expected"] != "PASS":
> +                info_line = "TEST-INFO | expected %s\n" % data["expected"]
> +                return "\n".join([failure_line, info_line])
> +            else:
> +                return failure_line

"don't put else right after a return" is in the style guide somewhere.
Attachment #8476717 - Flags: review?(cmanchester) → review+
bug 1055679 might have a change on inbound that conflicts with this, sorry about that.

Updated

4 years ago
Attachment #8476537 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/7c7f9d25fe38
Assignee: nobody → james
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Depends on: 1057666
You need to log in before you can comment on or make changes to this bug.