[Piglit] [PATCH 1/4] xts.py: Fix grouptools bugs

Dylan Baker baker.dylan.c at gmail.com
Wed Dec 31 16:21:55 PST 2014


1) Use of grouptools where os.path should have been used (hitting a
   grouptools assert)
2) Using grouptools.relgroup instead of from_path(os.path.relpath())
   This wasn't causing a problem since xts is run primarily on Unices,
   but it wasn't correct.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 tests/xts.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/xts.py b/tests/xts.py
index 0661558..d4577b6 100644
--- a/tests/xts.py
+++ b/tests/xts.py
@@ -73,7 +73,7 @@ class XTSTest(Test):
 
     def __init__(self, name, testname, testnum):
         super(XTSTest, self).__init__(
-            ['./' + grouptools.groupname(name), '-i', str(testnum)])
+            ['./' + os.path.basename(name), '-i', str(testnum)])
         self.testname = '{0}-{1}'.format(testname, testnum)
         self.cwd = os.path.dirname(os.path.realpath(name))
         self.test_results_file = os.path.join(self.cwd, self.testname)
@@ -185,8 +185,9 @@ def populate_profile():
                     if line.startswith('>>ASSERTION'):
                         num = next(counts)
                         group = grouptools.join(
-                            grouptools.relgroup(dirpath, X_TEST_SUITE),
-                            testname, num)
+                            grouptools.from_path(
+                                os.path.relpath(dirpath, X_TEST_SUITE)),
+                            testname, str(num))
 
                         profile.test_list[group] = XTSTest(
                             os.path.join(dirpath, testname),
-- 
2.2.1



More information about the Piglit mailing list