[PATCH pynfs 3/3] server: Add test code to JSON and XML output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 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




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux