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

Morton, Derek J derek.j.morton at intel.com
Wed Nov 11 02:09:51 PST 2015


Hi Thomas,
I have ran with your patches on android. The IGT_PLAIN_OUTPUT environment variable works fine for me. My only comment would be that it should be documented somewhere.

I will remove the formatting change from my gem_exec_nop patch as with this I don't think it is needed.

//Derek 

-----Original Message-----
From: Intel-gfx [mailto:intel-gfx-bounces at lists.freedesktop.org] On Behalf Of Thomas Wood
Sent: Tuesday, November 10, 2015 10:43 AM
To: Chris Wilson; Wood, Thomas; Intel Graphics Development
Subject: Re: [Intel-gfx] [PATCH i-g-t] lib: add a environment variable to control output

On 9 November 2015 at 20:58, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> 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()?

Yes, except that common_init is called from within the igt_main or _init functions, so calling igt_interactive_info before one of these functions would be incorrect anyway.


> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list