[qmtest] working with the xml result stream
Mark Mitchell
mark at codesourcery.com
Wed Oct 1 07:30:51 UTC 2003
On Tue, 2003-09-30 at 09:18, Stefan Seefeld wrote:
> I'v run into a little issue with the generated xml output using
> xml-result-stream.
>
> I run qmtest on a variety of platforms, and I generate one xml
> result file for each. Then I process these files with xslt to
> generate a 'result matrix'. At some point I'm determining the
> number of failures/passes/etc., and the xslt way to do this is
> with an xpath expression such as
>
> "count($target/results/result[outcome='FAIL'])"
>
> The problem is that the content of 'outcome' nodes varies
> between platforms, i.e. on linux it may be
>
> <outcome>PASS</outcome>
>
> and on windows
>
> <outcome>
> PASS
> </outcome>
>
> This means that I can't just compare the string values that
> easily, since the content differs in whitespace.
>
> Thus my question: wouldn't it be more natural to put the outcome
> value into an attribute ?
> A temporary workaround for my xpath expression may be to use
> "contains(outcome, 'FAIL')", but that seems quite hackish.
>
> Checking with the document type definition for result files
> I think it would be perfectly fine to make such a change,
> i.e. the outcome is actually an enum, so the dtd / schema could
> well be tightened a bit to make processing easier.
>
> Any thoughts ?
Yes, that would definitely be much better!
Are you willing to work on a patch? If so, you should make
XMLResultReader._GetResultFromDomNode accept both the old and new format
-- we try to maintain backward compatibility wherever possible.
Thanks!
--
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery.com
More information about the qmtest
mailing list