All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: linux-nfs@vger.kernel.org
Cc: Petr Vorel <pvorel@suse.cz>,
	"J . Bruce Fields" <bfields@redhat.com>,
	"Yong Sun (Sero)" <yosun@suse.com>
Subject: [PATCH pynfs 3/3] server: Add test code to JSON and XML output
Date: Mon, 24 May 2021 16:42:51 +0200	[thread overview]
Message-ID: <20210524144251.30196-3-pvorel@suse.cz> (raw)
In-Reply-To: <20210524144251.30196-1-pvorel@suse.cz>

test code is printed when parsed --outfile log with showresults.py.

It's useful to have it in JSON and XML log generated by testserver.py
--json or --xml.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 nfs4.1/testmod.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py
index 4b4ed24..47016dd 100644
--- a/nfs4.1/testmod.py
+++ b/nfs4.1/testmod.py
@@ -481,6 +481,7 @@ def json_printresults(tests, file_name, suite='all'):
         data["testcase"] = []
         for t in tests:
             test = {
+                "code": t.code,
                 "name": t.name,
                 "classname": t.suite,
                 "time": str(t.time_taken),
@@ -520,6 +521,7 @@ def xml_printresults(tests, file_name, suite='all'):
         for t in tests:
             testcase = doc.createElement("testcase")
             testsuite.appendChild(testcase)
+            testcase.setAttribute("code", t.code)
             testcase.setAttribute("name", t.name)
             testcase.setAttribute("classname", t.suite)
             testcase.setAttribute("time", t.time_taken)
-- 
2.31.1


      parent reply	other threads:[~2021-05-24 14:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24 14:42 [PATCH pynfs 1/3] remove trailing whitespace Petr Vorel
2021-05-24 14:42 ` [PATCH pynfs 2/3] server: Allow to print JSON format Petr Vorel
2021-05-25 14:10   ` J. Bruce Fields
2021-05-25 14:32     ` Petr Vorel
2021-05-24 14:42 ` Petr Vorel [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=20210524144251.30196-3-pvorel@suse.cz \
    --to=pvorel@suse.cz \
    --cc=bfields@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=yosun@suse.com \
    --subject='Re: [PATCH pynfs 3/3] server: Add test code to JSON and XML output' \
    /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

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.