This fixes running OpenCL tests under Valgrind, by applying the path transformation to the argument that the original command turned into.
It would be nice to have a cleaner solution here that doesn't depend on text substitution, but as long as there is no OpenCL test named "valgrind", this should work. --- framework/test/piglit_test.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/framework/test/piglit_test.py b/framework/test/piglit_test.py index 0881f00a6..ab6de0398 100644 --- a/framework/test/piglit_test.py +++ b/framework/test/piglit_test.py @@ -75,8 +75,7 @@ class PiglitBaseTest(ValgrindMixin, Test): @Test.command.getter def command(self): # Prepend TEST_BIN_DIR to the path. - cmd = os.path.join(TEST_BIN_DIR, super(PiglitBaseTest, self).command[0]) - return [cmd] + self._command[1:] + return [os.path.join(TEST_BIN_DIR, c) if c == self._command[0] else c for c in super(PiglitBaseTest, self).command ] def interpret_result(self): out = [] @@ -231,8 +230,7 @@ class CLProgramTester(PiglitCLTest): @PiglitCLTest.command.getter def command(self): command = super(CLProgramTester, self).command - command.insert(1, os.path.join(ROOT_DIR, self.filename)) - return command + return command + [ os.path.join(ROOT_DIR, self.filename) ] class VkRunnerTest(PiglitBaseTest): -- 2.20.1 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit