[Intel-gfx] [PATCH i-g-t] lib: add a environment variable to control output

Chris Wilson chris at chris-wilson.co.uk
Mon Nov 9 12:58:23 PST 2015


On Mon, Nov 09, 2015 at 05:17:13PM +0000, Thomas Wood wrote:
> Disable output of terminal control characters and progress meters when
> IGT_PLAIN_OUTPUT is set in the environment.
> 
> Cc: Derek Morton <derek.j.morton at intel.com>
> Signed-off-by: Thomas Wood <thomas.wood at intel.com>
> ---
>  lib/igt_aux.c  |  2 +-
>  lib/igt_core.c | 23 ++++++++++++++---------
>  lib/igt_core.h |  2 ++
>  3 files changed, 17 insertions(+), 10 deletions(-)
> 
> diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> index f3c76ae..4d08d68 100644
> --- a/lib/igt_aux.c
> +++ b/lib/igt_aux.c
> @@ -231,7 +231,7 @@ static void igt_interactive_info(const char *format, ...)
>  {
>  	va_list args;
>  
> -	if (!isatty(STDERR_FILENO))
> +	if (!isatty(STDERR_FILENO) || __igt_plain_output)

Hmm, would it not be a bug if we reach this point and we haven't
initialised __igt_plain_output from common_init()? 
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list