[Piglit] [PATCH 05/10] junit.py: Use grouptools instead of posixpath
Dylan Baker
baker.dylan.c at gmail.com
Thu Dec 4 15:10:02 PST 2014
This makes it clear that we're working with groups and not paths.
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
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
More information about the Piglit
mailing list