summaryrefslogtreecommitdiff
path: root/framework/test
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-03-26 10:42:14 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-05-01 14:27:38 -0700
commitdd460e1313dcb7b0ff5ab9036c6cb6ab07ae35d3 (patch)
tree99fc9e92c3faa7529b6fa7a36f4e70bf45ccb9f6 /framework/test
parentb6e94bde3f009637c683214fd19a601fef1539d0 (diff)
framework/test: Use getter for altering PiglitBaseTest Command
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. Tested-by: Rafael Antognolli <rafael.antognolli@intel.com>
Diffstat (limited to 'framework/test')
-rw-r--r--framework/test/piglit_test.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/framework/test/piglit_test.py b/framework/test/piglit_test.py
index cc129ed04..3d5b156a5 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 = []