Commit f6b5ed8f authored by Andres Gomez's avatar Andres Gomez
Browse files

framework/tests: add new piglit based test for replayer

  - Added a specific interpret_result implementation so we can
    identify when the Python replayer executable exists with a CRASH

Signed-off-by: Andres Gomez's avatarAndres Gomez <>
Reviewed-by: Dylan Baker's avatarDylan Baker <>
Part-of: <!353>
parent 91f40c4e
......@@ -40,6 +40,7 @@ __all__ = [
......@@ -257,3 +258,38 @@ class VkRunnerTest(PiglitBaseTest):
# to prepend TEST_BIN_DIR so that it will look for vkrunner in
# the search path.
return self._command + [os.path.join(ROOT_DIR, self.filename)]
class PiglitReplayerTest(PiglitBaseTest):
""" Make a PiglitTest instance for a Replayer test
Runs a single replayer test.
extra_args -- to pass to replayer
def __init__(self, extra_args, **kwargs):
super(PiglitReplayerTest, self).__init__(
['', 'compare', 'trace'], **kwargs)
self.extra_args = extra_args
def command(self):
command = super(PiglitReplayerTest, self).command
if self.RESULTS_PATH is not None:
command += ['--output', self.RESULTS_PATH]
return command + self.extra_args
def interpret_result(self):
# Python's unhandled exceptions use "1" as exit code value. We want to
# interpret this as a CRASH. Therefore, we change the exit code value
# to a negative one, which is the one the Test base class interprets as
# a CRASH.
if self.result.returncode == 1:
self.result.returncode = -1
super(PiglitReplayerTest, self).interpret_result()
Supports Markdown
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