Since ENV is now available to all of Test we can set the valgrind command in the command property, which is where it makes the most sense to have it.
Signed-off-by: Dylan Baker <[email protected]> --- framework/exectest.py | 7 +++---- framework/gleantest.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/framework/exectest.py b/framework/exectest.py index acc4daa..3bbcabb 100644 --- a/framework/exectest.py +++ b/framework/exectest.py @@ -115,6 +115,9 @@ class Test(object): @property def command(self): + if self.ENV.valgrind: + return ['valgrind', '--quiet', '--error-exitcode=1', + '--tool=memcheck'] + self._command return self._command @command.setter @@ -145,10 +148,6 @@ class Test(object): if self.command is not None: command = self.command - if self.ENV.valgrind: - command[:0] = ['valgrind', '--quiet', '--error-exitcode=1', - '--tool=memcheck'] - i = 0 skip = self.check_for_skip_scenario() while True: diff --git a/framework/gleantest.py b/framework/gleantest.py index d2697d4..53343f3 100644 --- a/framework/gleantest.py +++ b/framework/gleantest.py @@ -38,7 +38,7 @@ class GleanTest(Test): @Test.command.getter def command(self): - return self._command + self.globalParams + return super(GleanTest, self).command + self.globalParams def interpret_result(self, out, returncode, results): if "{'result': 'skip'}" in out: -- 1.9.2 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
