Commit dd460e13 authored by Dylan Baker's avatar Dylan Baker

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's avatarRafael Antognolli <rafael.antognolli@intel.com>
parent b6e94bde
......@@ -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 = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment