This makes it clear that we're working with groups and not paths.

Signed-off-by: Dylan Baker <[email protected]>
---
 framework/backends/junit.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/framework/backends/junit.py b/framework/backends/junit.py
index 3647601..1f902d2 100644
--- a/framework/backends/junit.py
+++ b/framework/backends/junit.py
@@ -27,6 +27,8 @@ try:
     from lxml import etree
 except ImportError:
     import xml.etree.cElementTree as etree
+
+import framework.grouptools as grouptools
 from framework.core import PIGLIT_CONFIG
 from .abstract import FileBackend
 
@@ -105,9 +107,8 @@ class JUnitBackend(FileBackend):
     def write_test(self, name, data):
         # Split the name of the test and the group (what junit refers to as
         # classname), and replace piglits '/' separated groups with '.', after
-        # replacing any '.' with '_' (so we don't get false groups). Also
-        # remove any '\\' that has been inserted on windows accidentally
-        classname, testname = os.path.split(os.path.normpath(name))
+        # replacing any '.' with '_' (so we don't get false groups).
+        classname, testname = grouptools.splitname(name)
         classname = classname.replace('.', '_')
         classname = JUnitBackend._REPLACE.sub('.', classname)
 
-- 
2.2.0

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

Reply via email to