Hello,
The patches for "Reporter" block are very basic. The criteria
initially is to get work for "Application" block started. I am on my
way to writing "Reviewer" now.
I did some testing and sessions are:
For testing RomBugzillaReporter:
>> from RomBugzillaReporter import RomBugzillaReporter
>> a = RomBugzillaReporter(475032)
>> a.printInfo("Testing")
>> a.reportBugzilla()
Checked Bug 475032
For testing RomReporter interface for report generation:
>> from RomReporter import RomReporter
>> rp = RomReporter()
>> from Spec import Spec
>> spec_obj = Spec("dnrd.spec")
>> rp.getReport()
''
>> rp.printInfo("Testing1", spec=spec_obj)
>> rp.getReport()
'dnrd.spec:77: I: Testing1 spec\n'
>> print rp.getReport()
dnrd.spec:77: I: Testing1 spec
>>> rp.printMust("Testing2", spec=spec_obj)
>> print rp.getReport()
dnrd.spec:77: I: Testing1 spec
dnrd.spec:77: M: Testing2 spec
>>> rp.printShould("Testing3", spec=spec_obj)
>> print rp.getReport()
dnrd.spec:77: I: Testing1 spec
dnrd.spec:77: M: Testing2 spec
dnrd.spec:77: S: Testing3 spec
>>> rp.printError("Testing3", spec=spec_obj)
>> print rp.getReport()
dnrd.spec:77: I: Testing1 spec
dnrd.spec:77: M: Testing2 spec
dnrd.spec:77: S: Testing3 spec
dnrd.spec:77: E: Testing3 spec
>>> rp.printWarning("Testing3", spec=spec_obj)
>> print rp.getReport()
dnrd.spec:77: I: Testing1 spec
dnrd.spec:77: M: Testing2 spec
dnrd.spec:77: S: Testing3 spec
dnrd.spec:77: E: Testing3 spec
dnrd.spec:77: W: Testing3 spec
Line number 77 because calls are being made after all parsing has been
done. But while running checks, current line number will be shown
depending upon where message got generated. There are some loose ends
still, but will tie them later. Some I know and some will become clear
as and when we move ahead.
For testing RomFileReporter:
>> from RomFileReporter import RomFileReporter
>> rp=RomFileReporter("report.txt")
>> from Spec import Spec
>> spec_obj = Spec("dnrd.spec")
>> rp.printInfo("Hello testing1", spec=spec_obj)
>> rp.getReport()
'dnrd.spec:77: I: Hello testing1 spec\n'
>> print rp.getReport()
dnrd.spec:77: I: Hello testing1
spec
>>> rp.printMust("Hello testing1", spec=spec_obj)
>> print rp.getReport()
dnrd.spec:77: I: Hello testing1
spec
dnrd.spec:77: M: Hello testing1 spec
>> rp.reportFile()
>>
[rpandit@rocky review-o-matic]$ cat report.txt
dnrd.spec:77: I: Hello testing1 spec
dnrd.spec:77: M: Hello testing1 spec
[rpandit@rocky review-o-matic]$
Hope it helps for review.
--
Cheers,
rakesh