[Piglit] [PATCH] framework/backends/junit: Split test name correctly on Windows.
jfonseca at vmware.com
jfonseca at vmware.com
Fri Nov 21 05:07:08 PST 2014
From: José Fonseca <jfonseca at vmware.com>
Use os.path instead of posixpath, which handles both / and \ on Windows.
---
framework/backends/junit.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/framework/backends/junit.py b/framework/backends/junit.py
index 59d06c6..3647601 100644
--- a/framework/backends/junit.py
+++ b/framework/backends/junit.py
@@ -20,9 +20,8 @@
""" Module implementing a JUnitBackend for piglit """
-import os
+import os.path
import re
-import posixpath
import shutil
try:
from lxml import etree
@@ -108,7 +107,7 @@ class JUnitBackend(FileBackend):
# 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 = posixpath.split(name)
+ classname, testname = os.path.split(os.path.normpath(name))
classname = classname.replace('.', '_')
classname = JUnitBackend._REPLACE.sub('.', classname)
--
1.9.1
More information about the Piglit
mailing list