From: "J. Bruce Fields" <bfields@fieldses.org>
To: "Mkrtchyan, Tigran" <tigran.mkrtchyan@desy.de>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] pynfs: fix reporting of ignored tests
Date: Mon, 7 Oct 2013 14:25:06 -0400 [thread overview]
Message-ID: <20131007182506.GA26432@fieldses.org> (raw)
In-Reply-To: <926019798.530894.1381168078530.JavaMail.zimbra@desy.de>
On Mon, Oct 07, 2013 at 07:47:58PM +0200, Mkrtchyan, Tigran wrote:
>
>
> ----- Original Message -----
> > From: "J. Bruce Fields" <bfields@fieldses.org>
> > To: "Tigran Mkrtchyan" <tigran.mkrtchyan@desy.de>
> > Cc: linux-nfs@vger.kernel.org
> > Sent: Monday, October 7, 2013 5:05:07 PM
> > Subject: Re: [PATCH] pynfs: fix reporting of ignored tests
> >
> > On Sat, Oct 05, 2013 at 10:27:15PM +0200, Tigran Mkrtchyan wrote:
> > > currently, ignored tests reported as failure, which
> > > makes fixing them quite hard.
> >
> > Thanks. And it's not counting warnings either? I wonder if
>
> The JUnit format does not have WARN. I can count them as failed.
> > printresults and xml_printresults should be sharing some code?
>
> I can will check how code duplication can be reduced
Thanks!
> as well as make nfsv4.0 able to use it as well.
Note testmod.py is actually shared between the two (it's a symlink), so
this should be done.
--b.
>
> Tigran.
> >
> > --b.
> >
> > >
> > > Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
> > > ---
> > > nfs4.1/testmod.py | 8 +++++++-
> > > 1 file changed, 7 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py
> > > index 3d74efe..68855de 100644
> > > --- a/nfs4.1/testmod.py
> > > +++ b/nfs4.1/testmod.py
> > > @@ -439,6 +439,7 @@ def printresults(tests, opts, file=None):
> > > def xml_printresults(tests, file_name, suite='all'):
> > > with open(file_name, 'w') as fd:
> > > failures = 0
> > > + skipped = 0
> > > total_time = 0
> > > doc = xml.dom.minidom.Document()
> > > testsuite = doc.createElement("testsuite")
> > > @@ -455,14 +456,19 @@ def xml_printresults(tests, file_name, suite='all'):
> > > testcase.setAttribute("time", str(t.time_taken))
> > >
> > > total_time += t.time_taken
> > > - if t.result not in (TEST_PASS, TEST_WARN):
> > > + if t.result == TEST_FAIL:
> > > failures += 1
> > > failure = doc.createElement("failure")
> > > failure.setAttribute("message", t.result.msg)
> > > err = doc.createCDATASection(''.join(t.result.tb))
> > > failure.appendChild(err)
> > > testcase.appendChild(failure)
> > > + elif t.result == TEST_OMIT:
> > > + skipped += 1
> > > + skip = doc.createElement("skipped")
> > > + testcase.appendChild(skip)
> > >
> > > testsuite.setAttribute("failures", str(failures))
> > > + testsuite.setAttribute("skipped", str(skipped))
> > > testsuite.setAttribute("time", str(total_time))
> > > fd.write(doc.toprettyxml(indent=" "))
> > > --
> > > 1.8.3.1
> > >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
prev parent reply other threads:[~2013-10-07 18:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-05 20:27 [PATCH] pynfs: fix reporting of ignored tests Tigran Mkrtchyan
2013-10-07 15:05 ` J. Bruce Fields
2013-10-07 16:05 ` Frank Filz
2013-10-07 17:45 ` Mkrtchyan, Tigran
2013-10-07 17:48 ` Frank Filz
2013-10-07 17:47 ` Mkrtchyan, Tigran
2013-10-07 18:25 ` J. Bruce Fields [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131007182506.GA26432@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=tigran.mkrtchyan@desy.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.