Bug Submission Assistant : sanity checks

The Bug Submission Assistant is built from information found in wiki and bugzilla. When they disagree, either because of a spelling mistake or another inconsistency, the Bug Submission Assistant fails. sanity checks were implemented to detects such inconsistencies and they are run each time the Bug Submission Assistant is updated.

implementation

The sanity.pl script is added to detect inconsistencies in the data extracted from the wiki and the data extracted from bugzilla. It is run each time the Bug Submission Assistant is created and will exit on error if an inconsistency is found. It checks if a) a component is found in the wiki and not in bugzilla and vice versa, b) if a component shows multiple times in the wiki.

running


After running the sanity checks, the following inconsistencies were found:

component Localization found in the wiki but not in the bugzilla
component Localisation found in bugzilla but not in the wiki

The spelling mistake was fixed in the wiki.

component BugAssistantTest found in bugzilla but not in the wiki

A special case was added to the sanity check script to ignore this error and a request was filled to remove this component from bugzilla.

testing

The sanity.pl script is tested to create the conditions in which it should exit on error. It uses input files created to exhibit all possible errors and the Test::More module is used to assert that it finds them and outputs a sensible error message. The tests can be run using:

make check

and will output the following:

perl sanity.pl TEST
ok 1 - PDF export 1
ok 2 - Writer 1
ok 3 - Drawing 1
ok 4 - Formula editor 1
ok 5 - UI 1
ok 6 - Installation 1
ok 7 - Extensions 1
ok 8 - Database 2
ok 9 - Localization -1
ok 10 - Chart 1
ok 11 - Documentation 1
ok 12 - Localisation 0
ok 13 - Presentation 1
ok 14 - contrib 1
ok 15 - WWW 1
ok 16 - Linguistic component 1
ok 17 - BASIC 1
ok 18 - BugAssistant 0
ok 19 - Libreoffice 1
ok 20 - Spreadsheet 1
component Database found 2 times in the wiki
component Localization found in the wiki but not in the bugzilla
component Localisation found in bugzilla but not in the wiki
component BugAssistant found in bugzilla but not in the wiki
wiki URL http://wiki.documentfoundation.org/BugReport_Details
components extracted with components.xsl from the wiki are in sanity-components.xhtml
bugzilla URL https://bugassistant.libreoffice.org/enter_bug.cgi?product=LibreOffice
bugzilla information retrieved from sanity-query.xhtml
ok 21 - analyze 4
1..21