This removes mutation of the class, and pushes the change out to run time instead of build time. This is better coding style, and is required for XML serialization, since paths need to be relative in the XML, and made absolute at runtime. --- framework/test/piglit_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/framework/test/piglit_test.py b/framework/test/piglit_test.py index cc129ed..3d5b156 100644 --- a/framework/test/piglit_test.py +++ b/framework/test/piglit_test.py @@ -70,8 +70,11 @@ class PiglitBaseTest(ValgrindMixin, Test): def __init__(self, command, run_concurrent=True, **kwargs): super(PiglitBaseTest, self).__init__(command, run_concurrent, **kwargs) + @Test.command.getter + def command(self): # Prepend TEST_BIN_DIR to the path. - self._command[0] = os.path.join(TEST_BIN_DIR, self._command[0]) + cmd = os.path.join(TEST_BIN_DIR, super(PiglitBaseTest, self).command[0]) + return [cmd] + self._command[1:] def interpret_result(self): out = [] -- git-series 0.9.1 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit