Closed
Bug 756515
Opened 13 years ago
Closed 13 years ago
Log files are not being created
Categories
(Mozilla QA Graveyard :: Mozmill Automation, defect)
Mozilla QA Graveyard
Mozmill Automation
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: davehunt, Assigned: davehunt)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
6.51 KB,
patch
|
whimboo
:
review+
|
Details | Diff | Splinter Review |
It appears that bug 732134 introduced a regression in the support of log file. Specifying --logfile or -l no longer creates a log file.
Assignee | ||
Comment 1•13 years ago
|
||
I've investigated locally, and because the logfile is set on __init__ I suspect we would need to pass through the command line arguments. I've tried removing the line 'del sys.argv[1:]' and the log file starts to work. I also found that doing this allows us to pass through the --port and --profile arguments too. I'll attach a patch shortly.
Assignee | ||
Comment 2•13 years ago
|
||
Comment 3•13 years ago
|
||
Apologies for not catching this earlier. This patch will fix the issue but will introduce the problems that deleting the system arguments was trying to solve -- TestRun has options that the Mozmill CLI does not have and it will cause an error when it is time to parse it. For example, using --junit with this patch will throw a "no such option" error.
One approach would be to delete all the arguments that should not be carried to the CLI:
> del sys.argv[1:]
> if self.options.logfile:
> sys.argv.append('--logfile=' + self.options.logfile)
A bit of a hack, but offers more reliability than changing Mozmill code. What do you think?
Assignee | ||
Comment 4•13 years ago
|
||
Ah, I see! I clearly didn't test my patch much - I figured there must be a good reason for deleting the system arguments. The suggestion looks fine to me. Henrik?
Comment 5•13 years ago
|
||
Comment on attachment 625171 [details] [diff] [review]
Restore logfile functionality. v1.0
As David said we cannot do this but I'm happy to use:
http://docs.python.org/library/optparse.html#optparse-option-callbacks
We for whichever option we have to re-set for Mozmill we can have generic code to do so.
Attachment #625171 -
Flags: review?(hskupin) → review-
Assignee | ||
Comment 6•13 years ago
|
||
This patch uses a callback. Tested with log, port, and profile arguments.
Attachment #625171 -
Attachment is obsolete: true
Attachment #637471 -
Flags: review?(hskupin)
Updated•13 years ago
|
Blocks: 732134
Keywords: regression
Comment 7•13 years ago
|
||
Comment on attachment 637471 [details] [diff] [review]
Restore logfile functionality. v2.0
This looks good Dave! The only thing it misses to put into the Mozmill args is the --report option. But I don't think we can do anything here. So lets get this part fixed for the Mozmill 2.0 case.
Attachment #637471 -
Flags: review?(hskupin) → review+
Comment 8•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•