Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/3] support/testing: simplify logging by keeping the log file open
Date: Wed, 17 May 2017 22:00:06 +0200	[thread overview]
Message-ID: <20170517220006.02dd1e60@free-electrons.com> (raw)
In-Reply-To: <1494452026-21567-3-git-send-email-luca@lucaceresoli.net>

Hello,

On Wed, 10 May 2017 23:33:46 +0200, Luca Ceresoli wrote:
> We currently call infra.smart_open() to open log files each time we
> need to write to them.
> 
> Opening the file once in the constructor of Builder and Emulator and
> writing to it whenever needed is simpler and slightly more efficient.
> 
> Remove smart_open and instead create a new open_log_file() function
> which just opens the logfile. Also let it compute the filename, in
> order to simplify even further the Builder and Emulator code.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> ---
>  support/testing/infra/__init__.py | 21 +++++++--------------
>  support/testing/infra/builder.py  | 12 +++---------
>  support/testing/infra/emulator.py | 15 +++++----------
>  3 files changed, 15 insertions(+), 33 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2017-05-17 20:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10 21:33 [Buildroot] [PATCH 1/3] support/testing: show messages in a more readable format Luca Ceresoli
2017-05-10 21:33 ` [Buildroot] [PATCH 2/3] support/testing: remove unused variable Luca Ceresoli
2017-05-10 21:42   ` Thomas Petazzoni
2017-05-10 21:33 ` [Buildroot] [PATCH 3/3] support/testing: simplify logging by keeping the log file open Luca Ceresoli
2017-05-17 20:00   ` Thomas Petazzoni [this message]
2017-05-10 21:42 ` [Buildroot] [PATCH 1/3] support/testing: show messages in a more readable format Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170517220006.02dd1e60@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox