Closed
Bug 1421799
Opened 8 years ago
Closed 8 years ago
Make 'mach' log format the default for |mach test| and |mach mochitest|
Categories
(Testing :: General, enhancement)
Testing
General
Tracking
(firefox59 fixed)
RESOLVED
FIXED
mozilla59
| Tracking | Status | |
|---|---|---|
| firefox59 | --- | fixed |
People
(Reporter: ahal, Assigned: ahal)
References
(Blocks 1 open bug)
Details
Attachments
(6 files, 1 obsolete file)
|
Bug 1421799 - [reftest] Log 'GECKO(<pid>)' instead of 'ProcessReader' for process_output log actions
59 bytes,
text/x-review-board-request
|
gbrown
:
review+
|
Details |
|
59 bytes,
text/x-review-board-request
|
gbrown
:
review+
|
Details |
|
59 bytes,
text/x-review-board-request
|
gbrown
:
review+
|
Details |
|
59 bytes,
text/x-review-board-request
|
gbrown
:
review+
|
Details |
|
452.47 KB,
image/png
|
Details | |
|
59 bytes,
text/x-review-board-request
|
gbrown
:
review+
|
Details |
Currently running |mach test| or |mach mochitest| uses the 'tbpl' format by default. The mach format tends to be a bit nicer to read on a terminal with color support, it would be good to use this by default.
It needs a bit of cleaning up though, it can be a bit verbose and seems to print None into the thread field a fair amount. This bug will first clean the format up a bit, and then make it the default.
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 6•8 years ago
|
||
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
| Assignee | ||
Updated•8 years ago
|
Attachment #8935154 -
Flags: review?(gbrown)
Attachment #8935155 -
Flags: review?(gbrown)
Attachment #8935156 -
Flags: review?(gbrown)
Attachment #8935157 -
Flags: review?(gbrown)
Attachment #8935158 -
Flags: review?(gbrown)
| Assignee | ||
Comment 7•8 years ago
|
||
This still depends on bug 1209463, but that bug shouldn't affect this bug too much, so might as well get the review process started.
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 13•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8935154 [details]
Bug 1421799 - [reftest] Log 'GECKO(<pid>)' instead of 'ProcessReader' for process_output log actions
https://reviewboard.mozilla.org/r/206002/#review212018
Attachment #8935154 -
Flags: review?(gbrown) → review+
Comment 14•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8935155 [details]
Bug 1421799 - [mochitest] Stop printing NOW RUNNING messages
https://reviewboard.mozilla.org/r/206004/#review212126
Just voicing my opinion...no need to act on it.
::: testing/mochitest/mach_commands.py
(Diff revision 2)
> for (flavor, subsuite), tests in sorted(suites.items()):
> fobj = ALL_FLAVORS[flavor]
> - msg = fobj['aliases'][0]
> - if subsuite:
> - msg = '{} with subsuite {}'.format(msg, subsuite)
> - print(NOW_RUNNING.format(msg))
I'm a little uncomfortable with removing this completely...I find it helpful to see the subsuite, when running multiple subsuites.
Attachment #8935155 -
Flags: review?(gbrown) → review+
Comment 15•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8935156 [details]
Bug 1421799 - [mozlog] Improve the 'mach' formatter
https://reviewboard.mozilla.org/r/206006/#review212134
::: testing/mozbase/mozlog/mozlog/formatters/machformatter.py:52
(Diff revision 2)
>
> s = super(MachFormatter, self).__call__(data)
> if s is None:
> return
>
> - time = format_seconds(self._time(data))
> + time = self.term.dim_blue(format_seconds(self._time(data)))
This feels a little "hard coded". I think it would be nice if there was one place in the code that mapped colours:
time_color = blue
error_color = red
...but I'm not clear on how to do that cleanly, and unsure if it is worth the effort.
Attachment #8935156 -
Flags: review?(gbrown) → review+
Comment 16•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8935157 [details]
Bug 1421799 - [test] Add mozlog logging arguments to |mach test| and |mach mochitest|
https://reviewboard.mozilla.org/r/206008/#review212138
Attachment #8935157 -
Flags: review?(gbrown) → review+
Comment 17•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8935158 [details]
Bug 1421799 - [test] Make the 'mach' formatter the default when running |mach test| and |mach mochitest|
https://reviewboard.mozilla.org/r/206010/#review212140
Seems like a good change -- looking forward to it.
Attachment #8935158 -
Flags: review?(gbrown) → review+
Comment 18•8 years ago
|
||
I could not apply your patches cleanly, so didn't test these at all, but the changes look reasonable and I really like the look of your screenshot -- good stuff!
| Assignee | ||
Comment 19•8 years ago
|
||
| mozreview-review-reply | ||
Comment on attachment 8935155 [details]
Bug 1421799 - [mochitest] Stop printing NOW RUNNING messages
https://reviewboard.mozilla.org/r/206004/#review212126
> I'm a little uncomfortable with removing this completely...I find it helpful to see the subsuite, when running multiple subsuites.
Later on in this patch series, the mach formatter will print the suite name (including mochitest subsuite) as part of the SUITE_START message. It's not as visible as this though.
The main reason I removed it was that it's mochitest specific, so when running `mach test` it's a little weird that it gets printed for some suites but not others. I'd also like to implement a terminal footer like |mach build| has which would have the currently running suite highlighted. I think this would be a better way of displaying this information, though I guess we could leave the current `print` statement as is until that gets landed.
| Assignee | ||
Comment 20•8 years ago
|
||
| mozreview-review-reply | ||
Comment on attachment 8935156 [details]
Bug 1421799 - [mozlog] Improve the 'mach' formatter
https://reviewboard.mozilla.org/r/206006/#review212134
> This feels a little "hard coded". I think it would be nice if there was one place in the code that mapped colours:
>
> time_color = blue
> error_color = red
>
> ...but I'm not clear on how to do that cleanly, and unsure if it is worth the effort.
Yeah, ideally I'd like to do something like mercurial does, and allow colors to be tweaked in `machrc`. Maybe we could allow users to specify something like:
[colors]
log.suite_start = yellow
log.process_output = blue
...
I don't want to scope bloat this bug though, I filed bug 1424287 to tackle it in a follow up.
Comment 21•8 years ago
|
||
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bbe4d2292f86
[reftest] Log 'GECKO(<pid>)' instead of 'ProcessReader' for process_output log actions r=gbrown
https://hg.mozilla.org/integration/autoland/rev/afe14ec646ab
[mochitest] Stop printing NOW RUNNING messages r=gbrown
https://hg.mozilla.org/integration/autoland/rev/2de335c0287a
[mozlog] Improve the 'mach' formatter r=gbrown
https://hg.mozilla.org/integration/autoland/rev/629e467a07be
[test] Add mozlog logging arguments to |mach test| and |mach mochitest| r=gbrown
https://hg.mozilla.org/integration/autoland/rev/7fb20bced076
[test] Make the 'mach' formatter the default when running |mach test| and |mach mochitest| r=gbrown
Comment 22•8 years ago
|
||
Backed out 5 changesets (bug 1421799) for failing browser-chrome on Linux and OSX and for failing autophone-mochitest on Android r=backout on a CLOSED TREE
https://treeherder.mozilla.org/logviewer.html#?job_id=151644980&repo=autoland&lineNumber=1892
https://hg.mozilla.org/integration/autoland/rev/61190fb111086d6db7efa0af1aed0e345016e25f
https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=7fb20bced07629eb683f79951f325ff07c07c8dc
Flags: needinfo?(ahalberstadt)
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 35•8 years ago
|
||
This was happening because I forgot to add mozterm to the test package. Sorry about that. This looks to be fixed with the latest series:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ce94b85bdeee612db9c87734ede29860b75d1d4f
Flags: needinfo?(ahalberstadt)
| Assignee | ||
Updated•8 years ago
|
Attachment #8937078 -
Flags: review?(gbrown)
| Assignee | ||
Comment 36•8 years ago
|
||
Still broken on Android.
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•8 years ago
|
Attachment #8935158 -
Attachment is obsolete: true
| Assignee | ||
Updated•8 years ago
|
Attachment #8937078 -
Flags: review?(gbrown)
Comment 42•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8937078 [details]
Bug 1421799 - [test_archive] Add 'mozterm' to common.tests.zip
https://reviewboard.mozilla.org/r/207786/#review214468
Attachment #8937078 -
Flags: review?(gbrown) → review+
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 48•8 years ago
|
||
Latest push rebases on top of central. May have gone a little overboard on the try testing, but everything looks good:
https://treeherder.mozilla.org/#/jobs?repo=try&author=ahalberstadt@mozilla.com&fromchange=798107446a2a230cff31c265306b1068c20275ac&tochange=eed4e8ad38fd7460cd4d549a537af780e96bbc1a
Comment 49•8 years ago
|
||
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e028f677bc80
[test_archive] Add 'mozterm' to common.tests.zip r=gbrown
https://hg.mozilla.org/integration/autoland/rev/8c1f1ab754a5
[reftest] Log 'GECKO(<pid>)' instead of 'ProcessReader' for process_output log actions r=gbrown
https://hg.mozilla.org/integration/autoland/rev/88dca5c8cfac
[mochitest] Stop printing NOW RUNNING messages r=gbrown
https://hg.mozilla.org/integration/autoland/rev/18b4fa241936
[mozlog] Improve the 'mach' formatter r=gbrown
https://hg.mozilla.org/integration/autoland/rev/f9f32474fdaf
[test] Add mozlog logging arguments to |mach test| and |mach mochitest| r=gbrown
Comment 50•8 years ago
|
||
Backed out for failing firefox ui functional tests:
https://hg.mozilla.org/integration/autoland/rev/9dcfb0365f3c758f9edbea67d94614cd582c1559
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=b91ce5ed4d3597cf627b49c96def71ba63f1cc7d&filter-resultStatus=usercancel&filter-resultStatus=runnable&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=153886422&repo=autoland
> Invalid requirement: '../tools/mozterm'
There are also failures for autophone on the push of this bug, but those jobs didn't run for the pushes before that: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=f9f32474fdaf5914832d256293ee1f98c6bf2561&filter-resultStatus=usercancel&filter-resultStatus=runnable&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception
Flags: needinfo?(ahalberstadt)
| Assignee | ||
Comment 51•8 years ago
|
||
The autophone failures are being fixed in the upstream repo (it's out of tree). I guess I missed the firefox ui tests in my try run. I guess those don't use the tests.zip? Adding a new package dependency is proving to be more of a pain than I was hoping :(
Flags: needinfo?(ahalberstadt)
| Assignee | ||
Comment 52•8 years ago
|
||
The firefox-ui-tests broke because the mozharness script wasn't configured to extract the 'mozterm' directory from the tests.zip. The autophone issue should also be fixed, just waiting on try results for both.
| Assignee | ||
Comment 53•8 years ago
|
||
Autophone retriggers on my failing push are coming back green:
https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=f9f32474fdaf5914832d256293ee1f98c6bf2561&filter-searchStr=autophone
Here's a new try run with firefox-ui tests fixed:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=70d7e9795255bae9f13f0f2600e05a2df951a70e
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 59•8 years ago
|
||
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5ee21ac1a6ec
[test_archive] Add 'mozterm' to common.tests.zip r=gbrown
https://hg.mozilla.org/integration/autoland/rev/419ba12cc0c8
[reftest] Log 'GECKO(<pid>)' instead of 'ProcessReader' for process_output log actions r=gbrown
https://hg.mozilla.org/integration/autoland/rev/0ad440c6f93b
[mochitest] Stop printing NOW RUNNING messages r=gbrown
https://hg.mozilla.org/integration/autoland/rev/cee49b47add0
[mozlog] Improve the 'mach' formatter r=gbrown
https://hg.mozilla.org/integration/autoland/rev/9b58dffaaa49
[test] Add mozlog logging arguments to |mach test| and |mach mochitest| r=gbrown
Comment 60•8 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/5ee21ac1a6ec
https://hg.mozilla.org/mozilla-central/rev/419ba12cc0c8
https://hg.mozilla.org/mozilla-central/rev/0ad440c6f93b
https://hg.mozilla.org/mozilla-central/rev/cee49b47add0
https://hg.mozilla.org/mozilla-central/rev/9b58dffaaa49
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Depends on: 1428298
Andrew, where is the code of mozterm and are we planning to add it to the tree?
Flags: needinfo?(ahalberstadt)
| Assignee | ||
Comment 62•8 years ago
|
||
It is in the tree under python/mozterm.
Flags: needinfo?(ahalberstadt)
(In reply to Andrew Halberstadt [:ahal] from comment #62)
> It is in the tree under python/mozterm.
Oh, I didn't thought about this folder. Would you mind to add a URL to the setup.py which points to the source? Right now it is not clear on PyPI where the source is located.
Comment 64•8 years ago
|
||
This is really awesome. I just don't know how to use it... is it possible to get this output already? how does one turn it on?
./mach mochitest devtools/client/storage/test/browser_storage_dynamic_updates_cookies.js --log-mach=-
You can also set an alias:
alias mochitest='./mach mochitest --log-mach=-'
Blocks: 1443557
| Assignee | ||
Comment 66•8 years ago
|
||
Oh, that's embarrassing. This bug was supposed to make the 'mach' format default, but 'tbpl' is still the default:
https://searchfox.org/mozilla-central/source/testing/mach_commands.py#67
I must have accidentally blown over that change while resolving conflicts or something and because I had:
[test]
format=mach
in my ~/.mozbuild/machrc, I never noticed. I'll file a new bug to get this fixed. If you want this on in the meantime, feel free to add the above to your machrc too (you may need to create it).
Also to note, reftest will still be excluded from this format as it is not compatible with the reftest-analyzer.
You need to log in
before you can comment on or make changes to this bug.
Description
•