Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/5] utils/genrandconfig: filter empty lines and comments in CSV file
Date: Sun, 29 Oct 2017 18:26:58 +0100	[thread overview]
Message-ID: <20171029172658.GE2899@scaer> (raw)
In-Reply-To: <20171029171440.8095-2-thomas.petazzoni@free-electrons.com>

Thomas, All,

On 2017-10-29 18:14 +0100, Thomas Petazzoni spake thusly:
> In preparation for the addition of comments in the CSV file listing
> toolchain configurations, we filter out such lines when reading the
> CSV file in utils/genrandconfig.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Small nit, below...

> ---
>  utils/genrandconfig | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/utils/genrandconfig b/utils/genrandconfig
> index a67d46fad9..e963349d70 100755
> --- a/utils/genrandconfig
> +++ b/utils/genrandconfig
> @@ -126,7 +126,9 @@ def get_toolchain_configs(toolchains_csv, buildrootdir):
>      """
>  
>      with open(toolchains_csv) as r:
> -        toolchains = decode_byte_list(r.readlines())
> +        # filter empty lines and comments
> +        lines = [ t for t in r.readlines() if len(t.strip()) > 0 and t[0] != '#' ]
> +        toolchains = decode_byte_list(lines)
>      configs = []
>  
>      (_, _, _, _, hostarch) = os.uname()
> @@ -164,6 +166,7 @@ def get_toolchain_configs(toolchains_csv, buildrootdir):
>          with open(configfile) as r:
>              config = r.readlines()
>          configs.append(config)
> +

Spurious hunk.

Regards,
Yann E. MORIN.

>      return configs
>  
>  
> -- 
> 2.13.6
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2017-10-29 17:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-29 17:14 [Buildroot] [PATCH 0/5] test-pkg: by default only test a subset of toolchains Thomas Petazzoni
2017-10-29 17:14 ` [Buildroot] [PATCH 1/5] utils/genrandconfig: filter empty lines and comments in CSV file Thomas Petazzoni
2017-10-29 17:26   ` Yann E. MORIN [this message]
2017-11-27 22:24   ` Thomas Petazzoni
2017-10-29 17:14 ` [Buildroot] [PATCH 2/5] test-pkg: " Thomas Petazzoni
2017-10-29 17:27   ` Yann E. MORIN
2017-11-27 22:30   ` Thomas Petazzoni
2017-10-29 17:14 ` [Buildroot] [PATCH 3/5] toolchain-configs.csv: re-organize for test-pkg Thomas Petazzoni
2017-10-29 17:35   ` Yann E. MORIN
2018-03-23 21:07     ` Thomas Petazzoni
2017-10-29 17:14 ` [Buildroot] [PATCH 4/5] test-pkg: test a subset of toolchains by default, add -a and -n options Thomas Petazzoni
2017-10-29 17:43   ` Yann E. MORIN
2017-10-29 17:14 ` [Buildroot] [PATCH 5/5] docs/manual: update the documentation about test-pkg 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=20171029172658.GE2899@scaer \
    --to=yann.morin.1998@free.fr \
    --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