[Intel-gfx] [PATCH i-g-t] lib: add a environment variable to control output
Thomas Wood
thomas.wood at intel.com
Tue Nov 10 02:43:23 PST 2015
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
More information about the Intel-gfx
mailing list