diff mbox series

[2/5] test-pkg: filter empty lines and comments in CSV file

Message ID 20171029171440.8095-3-thomas.petazzoni@free-electrons.com
State Accepted
Headers show
Series test-pkg: by default only test a subset of toolchains | expand

Commit Message

Thomas Petazzoni Oct. 29, 2017, 5:14 p.m. UTC
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/test-pkg.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 utils/test-pkg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Yann E. MORIN Oct. 29, 2017, 5:27 p.m. UTC | #1
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/test-pkg.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

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

Regards,
Yann E. MORIN.

> ---
>  utils/test-pkg | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utils/test-pkg b/utils/test-pkg
> index 6899d44f7c..1b7046eac4 100755
> --- a/utils/test-pkg
> +++ b/utils/test-pkg
> @@ -54,7 +54,7 @@ main() {
>      # Extract the URLs of the toolchains; drop internal toolchains
>      # E.g.: http://server/path/to/name.config,arch,libc
>      #  -->  http://server/path/to/name.config
> -    toolchains=($(sed -r -e 's/,.*//; /internal/d;' "${toolchains_csv}" \
> +    toolchains=($(sed -r -e 's/,.*//; /internal/d; /^#/d; /^$/d;' "${toolchains_csv}" \
>                    |if [ ${random} -gt 0 ]; then \
>                        sort -R |head -n ${random}
>                     else
> -- 
> 2.13.6
>
Thomas Petazzoni Nov. 27, 2017, 10:30 p.m. UTC | #2
Hello,

On Sun, 29 Oct 2017 18:14:37 +0100, Thomas Petazzoni wrote:
> 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/test-pkg.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  utils/test-pkg | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to next, thanks.

Thomas
diff mbox series

Patch

diff --git a/utils/test-pkg b/utils/test-pkg
index 6899d44f7c..1b7046eac4 100755
--- a/utils/test-pkg
+++ b/utils/test-pkg
@@ -54,7 +54,7 @@  main() {
     # Extract the URLs of the toolchains; drop internal toolchains
     # E.g.: http://server/path/to/name.config,arch,libc
     #  -->  http://server/path/to/name.config
-    toolchains=($(sed -r -e 's/,.*//; /internal/d;' "${toolchains_csv}" \
+    toolchains=($(sed -r -e 's/,.*//; /internal/d; /^#/d; /^$/d;' "${toolchains_csv}" \
                   |if [ ${random} -gt 0 ]; then \
                       sort -R |head -n ${random}
                    else