Find out why "mochitest*" logs skip/miss 1 line number at end of each test

VERIFIED FIXED

Status

Testing
Mochitest
VERIFIED FIXED
9 years ago
6 years ago

People

(Reporter: sgautherie, Assigned: dbaron)

Tracking

Trunk
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed by bug 482162, in T.M.="FIREFOX_3_7a5"])

(Reporter)

Description

9 years ago
(I had noticed that a long time ago I think, but I found the pattern only now.)

Example:
{
0 INFO SimpleTest START
1 INFO Running chrome://mochikit/content/a11y/accessible/test_accessnode_invalidation.html...
2 INFO TEST-PASS | chrome://mochikit/content/a11y/accessible/test_accessnode_invalidation.html | No accessible for paragraph after it became visible!
4 INFO Running chrome://mochikit/content/a11y/accessible/test_actions.xul...
}
Notice the missing "3".

I don't think this hurts by itself,
but I see no reason why it should do that,
and it complicates things when editing the log as reported and actual line numbers becomes more and more different :-/

(Reminder: MochiBrowserChrome has no line numbers.)

***

Alternatively, I'm not that fond of these reported line numbers,
but I think it would be good to have them either in all (mochi*) tests suites or none...
What do you think ?
(Reporter)

Updated

9 years ago
Whiteboard: [good first bug]
(Reporter)

Comment 1

9 years ago
Count code is:
http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/MochiKit/Logging.js
{
197     /** @id MochiKit.Logging.Logger.prototype.baseLog */
198     baseLog: function (level, message/*, ...*/) {
...
209         this.counter += 1;
}

We use |--*le-level=INFO| so the following line is not dispatched:
{
<nnn> DEBUG SimpleTest finished <test url>
}

Yet the counter is always incremented :-|
which explains the skipped number in our logs.

***

This is the only DEBUG line, see:
http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/testing/mochitest/tests/SimpleTest/TestRunner.js&mark=1.1

Ideas:
*Keep it as is.
*Give this line an "INFO" level.
*Give the |"Running " + url + "..."| line a "DEBUG" level.
*Modify MochiKit to not generate line numbers.
*...

Robert, what do you think?
Depends on: 357523
(Reporter)

Comment 2

6 years ago
(In reply to Serge Gautherie (:sgautherie) from comment #1)
> *Give this line an "INFO" level.

Bug 482162 did that.

***

https://tbpl.mozilla.org/php/getParsedLog.php?id=10661814&tree=Firefox&full=1
Rev3 Fedora 12 mozilla-central opt test mochitests-3/5 on 2012-04-05 02:56:37 PDT for push ac5721fa4acb
{
1195 INFO TEST-PASS | /tests/dom/tests/mochitest/ajax/jquery/test_jQuery.html | fx module: Chain slideToggle out - Make sure that overflow is reset (Old: visible Cur: visible): visible
1196 INFO TEST-END | /tests/dom/tests/mochitest/ajax/jquery/test_jQuery.html | finished in 19624ms
1197 INFO TEST-START | /tests/dom/tests/mochitest/ajax/mochikit/test_Mochikit.html
}

V.Fixed
Assignee: nobody → dbaron
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Depends on: 482162
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: [good first bug] → [fixed by bug 482162, in T.M.="FIREFOX_3_7a5"]
(Reporter)

Updated

6 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.