[Piglit] [PATCH 19/35] framework/test: make CLProgramTester take relative paths

Dylan Baker dylan at pnwbakers.com
Wed Apr 4 22:27:07 UTC 2018


---
 framework/test/piglit_test.py | 2 +-
 tests/cl.py                   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/framework/test/piglit_test.py b/framework/test/piglit_test.py
index 4fd825a..6511e0f 100644
--- a/framework/test/piglit_test.py
+++ b/framework/test/piglit_test.py
@@ -226,5 +226,5 @@ class CLProgramTester(PiglitCLTest):
     @PiglitCLTest.command.getter
     def command(self):
         command = super(CLProgramTester, self).command
-        command.insert(1, self.filename)
+        command.insert(1, os.path.join(ROOT_DIR, self.filename))
         return command
diff --git a/tests/cl.py b/tests/cl.py
index 2ab3502..56b3fc1 100644
--- a/tests/cl.py
+++ b/tests/cl.py
@@ -14,7 +14,7 @@ from __future__ import (
 import os
 
 from framework.profile import TestProfile
-from framework.test.piglit_test import PiglitCLTest, CLProgramTester
+from framework.test.piglit_test import PiglitCLTest, CLProgramTester, ROOT_DIR
 from framework import grouptools
 from .py_modules.constants import TESTS_DIR, GENERATED_TESTS_DIR
 
@@ -111,7 +111,7 @@ def add_program_test_dir(group, dirpath):
             continue
 
         profile.test_list[grouptools.join(group, testname)] = CLProgramTester(
-            os.path.join(dirpath, filename))
+            os.path.join(os.path.relpath(dirpath, ROOT_DIR), filename))
 
 
 add_program_test_dir(grouptools.join('program', 'build'),
-- 
git-series 0.9.1


More information about the Piglit mailing list