On 04/09/14 22:23, Dylan Baker wrote:
This adds 'piglit' as the first group in the junit xml (the classname),
this allows piglit to be run alongside other test suites on jenkins
without poluting the root node.

CC: Jose Fonseca <[email protected]>
Signed-off-by: Dylan Baker <[email protected]>
---
  framework/results.py | 9 +++++++++
  1 file changed, 9 insertions(+)

diff --git a/framework/results.py b/framework/results.py
index ddadcc1..3a8e9fd 100644
--- a/framework/results.py
+++ b/framework/results.py
@@ -405,6 +405,15 @@ class JUnitBackend(FSyncMixin, Backend):
          classname, testname = posixpath.split(name)
          classname = classname.replace('.', '_')
          classname = JUnitBackend._REPLACE.sub('.', classname)
+
+        # Add the test to the piglit group rather than directly to the root
+        # group, this allows piglit junit to be used in conjunction with other
+        # piglit
+        # TODO: It would be nice if other suites integrating with piglit could
+        # set different root names.
+        classname = 'piglit.{}'.format(classname)

  classname = 'piglit.' + classname

might be slightly more readable.

Either way looks good.

Thanks for this change.

Jose

+
+        # Create the root element
          element = etree.Element('testcase', name=testname,
                                  classname=classname,
                                  time=str(data['time']),


_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to