[Qt-interest] QTestLib: -xml output format does not work for me

Jaco Naude naude.jaco at gmail.com
Mon Apr 4 09:54:30 CEST 2011


That's it, thank you it solved it.

On Mon, Apr 4, 2011 at 7:49 AM, Mcgovern Rohan <rohan.mcgovern at nokia.com>wrote:

> Jaco Naude said:
> > Thanks Rohan
> >
> > Passing the arguments to qExec() solved it.
> >
> > Funny enough, it only works from command line, in Creator the parameters
> "-xml > results.xml" results in the following argc and argv in my app:
> >
> > Launching tester with 4 arguments:
> >
> > 0 : D
> >
> > 1 : -
> >
> > 2 : >
> >
> > 3 : r
> >
> >
> > I'm probably not using it correctly or something but for now running from
> the command line is fine.
>
> From the looks of it I would guess that:
>
>  - Your test program or its absolute path starts with the letter `D'
>
>  - Creator is passing the arguments "-xml", ">", "results.xml" to your
>    test program, which is correct.  ">" is a special character which is
>    understood by many shells, but Creator isn't running your program
>    through a shell, so this method of redirecting output won't work.
>
>  - in your test code, you incorrectly printed only the first character
>    of each argument, resulting in "D", "-", ">" and "r" being printed.
>
> May I also point out that you can use the `-o' option to testlib to
> print to a particular file :)  For example:
>
>  mytest -xml -o results.xml
> --
> Rohan McGovern
> Quality Engineer
> Qt Development Frameworks, Nokia
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110404/6e967d88/attachment.html 


More information about the Qt-interest-old mailing list