[Piglit] [PATCH] framework: flush out screen prints explicitly

Dylan Baker baker.dylan.c at gmail.com
Sat Feb 15 01:43:38 PST 2014


On Saturday, February 15, 2014 02:15:03 AM Ilia Mirkin wrote:
> Without the flush, updates only happen whenever the buffer overfills,
> which can be tens of tests.
> 
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>  framework/log.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/framework/log.py b/framework/log.py
> index dcbe345..01c3a32 100644
> --- a/framework/log.py
> +++ b/framework/log.py
> @@ -70,6 +70,9 @@ class Log(object):
> 
>          """
>          sys.stdout.write("{0} {1} \r".format(self._percent(),
> self._running())) +        # Need to flush explicitly, otherwise it all
> gets buffered without a +        # newline.
> +        sys.stdout.flush()
> 
>      @synchronized_self
>      def get_current(self):

Ah yes, that explains what's missing.
Reveiwed-by: Dylan Baker <baker.dylan.c at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140215/bd2286fa/attachment.pgp>


More information about the Piglit mailing list