Closed Bug 1056587 Opened 10 years ago Closed 10 years ago

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

Categories

(Testing :: Mozbase, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla34

People

(Reporter: jgraham, Assigned: jgraham)

References

Details

Attachments

(1 file, 1 obsolete file)

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).
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-
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.
Attachment #8476537 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/7c7f9d25fe38
Assignee: nobody → james
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: