diff options
author | Dylan Baker <dylanx.c.baker@intel.com> | 2014-11-21 17:09:47 -0800 |
---|---|---|
committer | Dylan Baker <dylanx.c.baker@intel.com> | 2014-12-12 09:21:47 -0800 |
commit | ddbdb94dd83e96f3a3efd3fd025d81bfbfefc622 (patch) | |
tree | 66593cb3811ad5998d7dd59fe9d027069b16e73f /framework | |
parent | e560cbb99b3e7ac8f7e1798b6d6ad0ee8642f8ad (diff) |
junit.py: Use grouptools
This makes it clear that we're working with groups and not paths.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/backends/junit.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/backends/junit.py b/framework/backends/junit.py index 364760139..1f902d2e3 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) |