[Piglit] [PATCH 1/2] core: print the real command with arguments in the test report

Ian Romanick idr at freedesktop.org
Mon Apr 4 09:13:41 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The funny thing is that I just had to dig through gleantest.py to figure
out how to run an individual glean test.  This would have saved me some
time.

Acked-by: Ian Romanick <ian.d.romanick at intel.com>

On 04/04/2011 07:45 AM, Marek Olšák wrote:
> ---
>  framework/exectest.py  |    1 +
>  framework/gleantest.py |    6 ++++++
>  2 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/framework/exectest.py b/framework/exectest.py
> index 47924e7..114908c 100644
> --- a/framework/exectest.py
> +++ b/framework/exectest.py
> @@ -82,6 +82,7 @@ class PlainExecTest(Test):
>  
>  			results['info'] = "@@@Returncode: %d\n\nErrors:\n%s\n\nOutput:\n%s" % (proc.returncode, err, out)
>  			results['returncode'] = proc.returncode
> +			results['command'] = ' '.join(self.command)
>  		else:
>  			results = TestResult()
>  			if 'result' not in results:
> diff --git a/framework/gleantest.py b/framework/gleantest.py
> index 90291c8..1de4bba 100644
> --- a/framework/gleantest.py
> +++ b/framework/gleantest.py
> @@ -72,6 +72,12 @@ class GleanTest(Test):
>  			results['result'] = 'fail'
>  
>  		results['returncode'] = glean.returncode
> +		results['command'] = ' '.join(self.command + GleanTest.globalParams)
> +
> +		env = ''
> +		for key in self.env:
> +			env = env + key + '="' + self.env[key] + '" ';
> +		results['environment'] = env
>  
>  		self.handleErr(results, err)
>  

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk2Z7jUACgkQX1gOwKyEAw8w/QCeNitviQepRw3sw53SGEV5jy8K
U9EAn107AN5t5i/2HpEXfMuU2yucTmP0
=cNSN
-----END PGP SIGNATURE-----


More information about the Piglit mailing list