[Intel-gfx] [PATCH i-g-t 1/4] tests/kms_flip: only print the activity indicator if output is a terminal

Daniel Vetter daniel at ffwll.ch
Mon Sep 29 18:39:27 CEST 2014


On Mon, Sep 29, 2014 at 04:28:15PM +0100, Thomas Wood wrote:
> Signed-off-by: Thomas Wood <thomas.wood at intel.com>
> ---
>  tests/kms_flip.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> index 3d3aa9b..8551f64 100644
> --- a/tests/kms_flip.c
> +++ b/tests/kms_flip.c
> @@ -885,7 +885,10 @@ static unsigned int run_test_step(struct test_output *o)
>  		join_vblank_wait_thread();
>  	}
>  
> -	igt_info("."); fflush(stdout);
> +	if (isatty(STDOUT_FILENO)) {
> +		igt_info(".");
> +		fflush(stdout);
> +	}

Hm, igt_interactive_info() to wrap this?
-Daniel

>  
>  	if (do_flip && (o->flags & TEST_HANG)) {
>  		hang = hang_gpu(drm_fd);
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list