Closed Bug 1440405 Opened 2 years ago Closed 2 years ago
`mach mochitest --valgrind` results in an error, rather than running the test
Bug 1440405 - Fix faulty assumption that only one log handler can be installed in |mach test/mochitest|,
59 bytes, text/x-review-board-request
STR: 1. Run mach mochitest --valgrind=valgrind --quiet browser/tools/mozscreenshots/devtools/browser_devtools.js Expected results: Test begins to run. Actual results: Error running mach: ['mochitest', '--valgrind=valgrind', '--quiet', 'browser/tools/mozscreenshots/devtools/browser_devtools.js'] The error occurred in the implementation of the invoked mach command. This should never occur and is likely a bug in the implementation of that command. Consider filing a bug for this issue. If filing a bug, please include the full output of mach, including this error message. The details of the failure are as follows: AttributeError: 'ValgrindHandler' object has no attribute 'formatter' File "/home/froydnj/src/gecko-dev.git/testing/mochitest/mach_commands.py", line 308, in run_mochitest_general kwargs['log'].handlers.formatter.inner.summary_on_shutdown = True I am unsure of how to fix this. I see that ValgrindHandler doesn't have a .formatter object, whereas something like StreamHandler does. But I have no idea how to inject a formatter from: http://dxr.mozilla.org/mozilla-central/source/testing/mozbase/mozlog/mozlog/commandline.py#155 ahal, are you able to lend assistance here?
Summary: `mach mochitest valgrind` results in an error, rather than running the test → `mach mochitest --valgrind` results in an error, rather than running the test
The bug is that mach_commands.py is assuming that handlers is going to be the StreamHandler. Should be an easy fix.
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
I'm going to be PTO the next couple of weeks, so feel free to land on my behalf after reviewing.
Comment on attachment 8953434 [details] Bug 1440405 - Fix faulty assumption that only one log handler can be installed in |mach test/mochitest|, https://reviewboard.mozilla.org/r/222694/#review228722 This seems to work, thank you for the rapid turnaround!
Attachment #8953434 - Flags: review?(nfroyd) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/f89b5611098e Fix faulty assumption that only one log handler can be installed in |mach test/mochitest|, r=froydnj
You need to log in before you can comment on or make changes to this bug.