This is the mail archive of the
mauve-patches@sourceware.org
mailing list for the Mauve project.
Re: [PATCH] Fix xmlout option
- From: Mark Wielaard <mark at klomp dot org>
- To: Omair Majid <omajid at redhat dot com>
- Cc: mauve-patches at sources dot redhat dot com
- Date: Fri, 13 Feb 2009 14:01:50 +0100
- Subject: Re: [PATCH] Fix xmlout option
- References: <49945396.5050000@redhat.com>
Hi Omair,
On Thu, 2009-02-12 at 11:51 -0500, Omair Majid wrote:
> The attached patch fixes the issue in mauve when running the entire test
> suite with -xmlout fails:
>
> $ java Harness -vm /usr/bin/java -xmlout xmloutputfile
> No tests were run. Possible reasons may be listed below.
> Did you specify a test that doesn't exist or a folder that contains no
> tests?
>
> The bug seems to be that mauve ignores the -xmlout option and then
> treats xmloutputfile as the name of the test to run. The patch adds a
> case in Harness.setupHarness() so that the argument after -xmlout is
> skipped (it is later checked in RunnerProcess).
Thanks. It took me some time to understand how this was supposed to work
with the ping-pong between Harness and RunnerProcess. I am afraid you
might be the first one in a long time that has worked with the xml
output. So don't be surprised if you find more bugs. Sorry about that.
> --- Harness.java.orig 2009-02-12 11:30:11.000000000 -0500
> +++ Harness.java 2009-02-12 11:34:23.000000000 -0500
> @@ -338,6 +338,13 @@
> "after '-timeout'. Exit");
> runner_timeout = Long.parseLong(args[i]);
> }
> + else if (args[i].equals("-xmlout"))
> + {
> + // Option handled by RunnerProcess
> + // Next arg is filename; RunnerProcess checks the args
> + // again
> + ++i;
> + }
I think you should explicitly check that args.length still has another
element like the other checks before this one. The help message implies
that the file name is optional, but it really isn't since RunnerProcess
depends on it. Could you make that change and update the help message?
Thanks,
Mark