better error messages on the build server

Friedrich W. H. Kossebau kossebau at kde.org
Tue May 15 16:59:09 BST 2012


Am Dienstag, 15. Mai 2012, 17:39:12 schrieb Jos van den Oever:
> On Tuesday 15 May 2012 16:44:29 PM Friedrich W. H. Kossebau wrote:
> > Hi Jos,
> > 
> > good stuff, we need more people working on this like you, thanks!
> > /me looks at wall without mirror ;)
> 
> It feels good that it's appreciated. I have a penchant for large scale
> automated testing and leads to long lists of errors. I like that because it
> gives a clear list of things to fix. Some get depressed by the list, but
> it's really not so bad. The problems are very fixable and if the list
> should evaporate due to developer heat, it will look very good for
> Calligra.

Indeed. Just put a little fire to 
calligratests/odf/odt/portrait_landscape.odt, validates now here, review 
request coming up :)

> > Am Dienstag, 15. Mai 2012, 13:00:58 schrieb Jos van den Oever:
> > > Hello all,
> > > 
> > > Over the weekend I ported the script to test document round-tripping and
> > > conversion from python to java. The advantage is an increase in speed
> > > and
> > > better error messages. The runtime for the tests has decreased from two
> > > hours to one hours and fifteen minutes.
> > > 
> > > The main advantage is that the ODF documents are now validated with Jing
> > > instead of libxml2. libxml2 has an incomplete implementation of Relax NG
> > > and this led to false positives (reported errors that are not real
> > > errors) and missed problems.
> > > 
> > > Currently 528 failing documents and 2175 passing. So one in five
> > > documents either crashes calligra or results in invalid ODF.
> > 
> > A few of these invalid ODFs are about
> > --- 8< ---
> > token "0pt" invalid; must be a string matching the regular expression
> > "([0-9]*[1-9][0-9]*(\.[0-9]*)?|0+\.[0-9]*[1-9][0-9]*|\.[0-9]*[1-9][0-9]*)
> > ((cm)|(mm)|(in)|(pt)|(pc)|(px))"
> > --- 8< ---
> > 
> > From 18.3.18 length or 18.3.26 positiveLength I cannot directly see why
> > "0pt" is not valid. Do I miss to read the spec correctly, is that
> > knowledge not hardcoded in the spec, or is the regular expression used in
> > the validator perhaps too strict?
> 
> In the list of errors there are five messages that says that token '0pt' is
> not ok. This is noted for the attributes style:border-line-width,
> style:border-line-width-top, style:border-line-width-right,
> style:border-line- width-left, style:border-line-width-bottom.
> 
> All of these have a definition in the 1.2 spec like this:
> 
> The values of the style:border-line-width attribute are three white space
> separated values of type positiveLength 18.3.26.
> 
> So, "0pt" is not correct, positiveLength means larger than 0.

Ah, so there is my mistake in reading the spec. 0 is not part of positive 
values here. It is "nonNegativeLength" where 0 is part of the allowed values, 
okay.

> I created these files with odfautotests [1], which is also used on the build
> server now.

> [1] https://gitorious.org/odfautotests

Oh, good, looks great as well. Hopefully soon this will be picked up by ODF 
enthusiast/interest, very good to have that started.

I guess you will soon blog about that? :)

Cheers
Friedrich



More information about the calligra-devel mailing list