Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/4] DEVELOPERS: add Ricardo Martincoski for support/testing
@ 2017-07-23  4:20 Ricardo Martincoski
  2017-07-23  4:20 ` [Buildroot] [PATCH 2/4] testing/infra/builder: dump config to log Ricardo Martincoski
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Ricardo Martincoski @ 2017-07-23  4:20 UTC (permalink / raw)
  To: buildroot

While at it, also move my professional entry near my personal one.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 DEVELOPERS | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/DEVELOPERS b/DEVELOPERS
index 0c22ffcd0c..23999a3127 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1398,13 +1398,14 @@ F:	package/ustream-ssl/
 N:	Renaud Aubin <root@renaud.io>
 F:	package/libhttpparser/
 
-N:	Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
-F:	package/atop/
-
 N:	Rhys Williams <github@wilberforce.co.nz>
 F:	package/lirc-tools/
 
+N:	Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
+F:	package/atop/
+
 N:	Ricardo Martincoski <ricardo.martincoski@gmail.com>
+F:	support/testing/
 F:	utils/check-package
 F:	utils/checkpackagelib/
 
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 2/4] testing/infra/builder: dump config to log
  2017-07-23  4:20 [Buildroot] [PATCH 1/4] DEVELOPERS: add Ricardo Martincoski for support/testing Ricardo Martincoski
@ 2017-07-23  4:20 ` Ricardo Martincoski
  2017-07-23  9:14   ` Yann E. MORIN
  2017-07-23 21:44   ` [Buildroot] [PATCH v2 1/3] testing/infra/builder: dump defconfig " Ricardo Martincoski
  2017-07-23  4:20 ` [Buildroot] [PATCH 3/4] support/testing: fix run-tests -j Ricardo Martincoski
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 13+ messages in thread
From: Ricardo Martincoski @ 2017-07-23  4:20 UTC (permalink / raw)
  To: buildroot

The config is composed on-the-fly by test infra + tests.

Dump it to the logfile before running 'make olddefconfig' so it can
easily analysed when debugging.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 support/testing/infra/builder.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/support/testing/infra/builder.py b/support/testing/infra/builder.py
index a475bb0a30..dc128cdd8a 100644
--- a/support/testing/infra/builder.py
+++ b/support/testing/infra/builder.py
@@ -17,6 +17,9 @@ class Builder(object):
         config_file = os.path.join(self.builddir, ".config")
         with open(config_file, "w+") as cf:
             cf.write(self.config)
+        # dump the config to the logfile for easy debugging
+        self.logfile.write("> config:\n" + self.config)
+        self.logfile.flush()
 
         cmd = ["make",
                "O={}".format(self.builddir),
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 3/4] support/testing: fix run-tests -j
  2017-07-23  4:20 [Buildroot] [PATCH 1/4] DEVELOPERS: add Ricardo Martincoski for support/testing Ricardo Martincoski
  2017-07-23  4:20 ` [Buildroot] [PATCH 2/4] testing/infra/builder: dump config to log Ricardo Martincoski
@ 2017-07-23  4:20 ` Ricardo Martincoski
  2017-07-23  9:01   ` Yann E. MORIN
  2017-07-23  4:20 ` [Buildroot] [PATCH 4/4] testing/infra/basetest: move jlevel logic to constructor Ricardo Martincoski
  2017-07-25 20:20 ` [Buildroot] [PATCH 1/4] DEVELOPERS: add Ricardo Martincoski for support/testing Thomas Petazzoni
  3 siblings, 1 reply; 13+ messages in thread
From: Ricardo Martincoski @ 2017-07-23  4:20 UTC (permalink / raw)
  To: buildroot

Since commit cf3cd4388a652c9af27ef1c35622e2d0a55b99a9 the -j option is
silently ignored.

The configuration lines are processed using '\n'.join().
This function adds intervening occurrences of the separator, but the
resulting string does not end at a separator.
 >>> "n".join(["a","b"])
 'anb'
It results in a config that does not end in a newline.

When BR2_JLEVEL is added by -j logic to the config it ends up
concatenated to the last line of the config.
 BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM=yBR2_JLEVEL=7
The resulting .config has the default BR2_JLEVEL=0.

Instead of just workaround this problem by adding a newline before
BR2_JLEVEL when -j is used, make the config to end in a newline since it
is a more future-proof solution.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
---
 support/testing/infra/basetest.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py
index 07c180e232..29e7872572 100644
--- a/support/testing/infra/basetest.py
+++ b/support/testing/infra/basetest.py
@@ -41,7 +41,8 @@ class BRTest(unittest.TestCase):
         self.testname = self.__class__.__name__
         self.builddir = self.outputdir and os.path.join(self.outputdir, self.testname)
         self.emulator = None
-        self.config = '\n'.join([line.lstrip() for line in self.config.splitlines()])
+        self.config = '\n'.join([line.lstrip() for line in
+                                 self.config.splitlines()]) + '\n'
 
     def show_msg(self, msg):
         print "{} {:40s} {}".format(datetime.datetime.now().strftime("%H:%M:%S"),
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 4/4] testing/infra/basetest: move jlevel logic to constructor
  2017-07-23  4:20 [Buildroot] [PATCH 1/4] DEVELOPERS: add Ricardo Martincoski for support/testing Ricardo Martincoski
  2017-07-23  4:20 ` [Buildroot] [PATCH 2/4] testing/infra/builder: dump config to log Ricardo Martincoski
  2017-07-23  4:20 ` [Buildroot] [PATCH 3/4] support/testing: fix run-tests -j Ricardo Martincoski
@ 2017-07-23  4:20 ` Ricardo Martincoski
  2017-07-23  9:20   ` Yann E. MORIN
  2017-07-25 20:20 ` [Buildroot] [PATCH 1/4] DEVELOPERS: add Ricardo Martincoski for support/testing Thomas Petazzoni
  3 siblings, 1 reply; 13+ messages in thread
From: Ricardo Martincoski @ 2017-07-23  4:20 UTC (permalink / raw)
  To: buildroot

As suggested by Arnout in [1].

While at it, simplify the logic by always appending the BR2_JLEVEL and
defaulting to 0 (the value copied from Config.in is used for 5 years now
and is very unlikely to change).

[1] http://patchwork.ozlabs.org/patch/790525/

Suggested-by: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
tip for git send-email:
Cc: Arnout Vandecappelle <arnout@mind.be>
---
 support/testing/infra/basetest.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py
index 29e7872572..431605b23f 100644
--- a/support/testing/infra/basetest.py
+++ b/support/testing/infra/basetest.py
@@ -34,7 +34,7 @@ class BRTest(unittest.TestCase):
     outputdir = None
     logtofile = True
     keepbuilds = False
-    jlevel = None
+    jlevel = 0
 
     def __init__(self, names):
         super(BRTest, self).__init__(names)
@@ -43,16 +43,14 @@ class BRTest(unittest.TestCase):
         self.emulator = None
         self.config = '\n'.join([line.lstrip() for line in
                                  self.config.splitlines()]) + '\n'
+        self.config += "BR2_JLEVEL={}\n".format(self.jlevel)
 
     def show_msg(self, msg):
         print "{} {:40s} {}".format(datetime.datetime.now().strftime("%H:%M:%S"),
                                     self.testname, msg)
     def setUp(self):
         self.show_msg("Starting")
-        config = self.config
-        if self.jlevel:
-            config += "BR2_JLEVEL={}\n".format(self.jlevel)
-        self.b = Builder(config, self.builddir, self.logtofile)
+        self.b = Builder(self.config, self.builddir, self.logtofile)
 
         if not self.keepbuilds:
             self.b.delete()
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 3/4] support/testing: fix run-tests -j
  2017-07-23  4:20 ` [Buildroot] [PATCH 3/4] support/testing: fix run-tests -j Ricardo Martincoski
@ 2017-07-23  9:01   ` Yann E. MORIN
  0 siblings, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2017-07-23  9:01 UTC (permalink / raw)
  To: buildroot

Ricardo, All,

On 2017-07-23 01:20 -0300, Ricardo Martincoski spake thusly:
> Since commit cf3cd4388a652c9af27ef1c35622e2d0a55b99a9 the -j option is
> silently ignored.
> 
> The configuration lines are processed using '\n'.join().
> This function adds intervening occurrences of the separator, but the
> resulting string does not end at a separator.
>  >>> "n".join(["a","b"])
>  'anb'
> It results in a config that does not end in a newline.
> 
> When BR2_JLEVEL is added by -j logic to the config it ends up
> concatenated to the last line of the config.
>  BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM=yBR2_JLEVEL=7
> The resulting .config has the default BR2_JLEVEL=0.

Confirmed.

> Instead of just workaround this problem by adding a newline before
> BR2_JLEVEL when -j is used, make the config to end in a newline since it
> is a more future-proof solution.
> 
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Yann E. MORIN <yann.morin.1998@free.fr>

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

Regards,
Yann E. MORIN.

> ---
>  support/testing/infra/basetest.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py
> index 07c180e232..29e7872572 100644
> --- a/support/testing/infra/basetest.py
> +++ b/support/testing/infra/basetest.py
> @@ -41,7 +41,8 @@ class BRTest(unittest.TestCase):
>          self.testname = self.__class__.__name__
>          self.builddir = self.outputdir and os.path.join(self.outputdir, self.testname)
>          self.emulator = None
> -        self.config = '\n'.join([line.lstrip() for line in self.config.splitlines()])
> +        self.config = '\n'.join([line.lstrip() for line in
> +                                 self.config.splitlines()]) + '\n'
>  
>      def show_msg(self, msg):
>          print "{} {:40s} {}".format(datetime.datetime.now().strftime("%H:%M:%S"),
> -- 
> 2.13.0
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 2/4] testing/infra/builder: dump config to log
  2017-07-23  4:20 ` [Buildroot] [PATCH 2/4] testing/infra/builder: dump config to log Ricardo Martincoski
@ 2017-07-23  9:14   ` Yann E. MORIN
  2017-07-23 18:44     ` Ricardo Martincoski
  2017-07-23 21:44   ` [Buildroot] [PATCH v2 1/3] testing/infra/builder: dump defconfig " Ricardo Martincoski
  1 sibling, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2017-07-23  9:14 UTC (permalink / raw)
  To: buildroot

Ricardo, All,

On 2017-07-23 01:20 -0300, Ricardo Martincoski spake thusly:
> The config is composed on-the-fly by test infra + tests.
> 
> Dump it to the logfile before running 'make olddefconfig' so it can
> easily analysed when debugging.
> 
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
> ---
>  support/testing/infra/builder.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/support/testing/infra/builder.py b/support/testing/infra/builder.py
> index a475bb0a30..dc128cdd8a 100644
> --- a/support/testing/infra/builder.py
> +++ b/support/testing/infra/builder.py
> @@ -17,6 +17,9 @@ class Builder(object):
>          config_file = os.path.join(self.builddir, ".config")
>          with open(config_file, "w+") as cf:
>              cf.write(self.config)
> +        # dump the config to the logfile for easy debugging
> +        self.logfile.write("> config:\n" + self.config)
> +        self.logfile.flush()

Although the variable is named 'comfig', it is in fact a defconfig.

Also, it is easy to miss exactly where the end of the config is, so
maybe:

  - prefix all lines with 'config: ',
or
  - add 'start config' and 'end config'.

Otherwise;

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

Regards,
Yann E. MORIN.

>  
>          cmd = ["make",
>                 "O={}".format(self.builddir),
> -- 
> 2.13.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 4/4] testing/infra/basetest: move jlevel logic to constructor
  2017-07-23  4:20 ` [Buildroot] [PATCH 4/4] testing/infra/basetest: move jlevel logic to constructor Ricardo Martincoski
@ 2017-07-23  9:20   ` Yann E. MORIN
  0 siblings, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2017-07-23  9:20 UTC (permalink / raw)
  To: buildroot

Ricardo, all,

On 2017-07-23 01:20 -0300, Ricardo Martincoski spake thusly:
> As suggested by Arnout in [1].
> 
> While at it, simplify the logic by always appending the BR2_JLEVEL and
> defaulting to 0 (the value copied from Config.in is used for 5 years now
> and is very unlikely to change).
> 
> [1] http://patchwork.ozlabs.org/patch/790525/
> 
> Suggested-by: Arnout Vandecappelle <arnout@mind.be>
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
> ---
> tip for git send-email:
> Cc: Arnout Vandecappelle <arnout@mind.be>

You can (and should) leave that one below you SoB line, not after the
'---' line, because it is important that it is recorded as part of the
commit log.

It is not a problem that Arnout (or whoever) is named twice in a tag.

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

Regards,
Yann E. MORIN.

> ---
>  support/testing/infra/basetest.py | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py
> index 29e7872572..431605b23f 100644
> --- a/support/testing/infra/basetest.py
> +++ b/support/testing/infra/basetest.py
> @@ -34,7 +34,7 @@ class BRTest(unittest.TestCase):
>      outputdir = None
>      logtofile = True
>      keepbuilds = False
> -    jlevel = None
> +    jlevel = 0
>  
>      def __init__(self, names):
>          super(BRTest, self).__init__(names)
> @@ -43,16 +43,14 @@ class BRTest(unittest.TestCase):
>          self.emulator = None
>          self.config = '\n'.join([line.lstrip() for line in
>                                   self.config.splitlines()]) + '\n'
> +        self.config += "BR2_JLEVEL={}\n".format(self.jlevel)
>  
>      def show_msg(self, msg):
>          print "{} {:40s} {}".format(datetime.datetime.now().strftime("%H:%M:%S"),
>                                      self.testname, msg)
>      def setUp(self):
>          self.show_msg("Starting")
> -        config = self.config
> -        if self.jlevel:
> -            config += "BR2_JLEVEL={}\n".format(self.jlevel)
> -        self.b = Builder(config, self.builddir, self.logtofile)
> +        self.b = Builder(self.config, self.builddir, self.logtofile)
>  
>          if not self.keepbuilds:
>              self.b.delete()
> -- 
> 2.13.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 2/4] testing/infra/builder: dump config to log
  2017-07-23  9:14   ` Yann E. MORIN
@ 2017-07-23 18:44     ` Ricardo Martincoski
  0 siblings, 0 replies; 13+ messages in thread
From: Ricardo Martincoski @ 2017-07-23 18:44 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, Jul 23, 2017 at 06:14 AM, Yann E. MORIN wrote:

> On 2017-07-23 01:20 -0300, Ricardo Martincoski spake thusly:
[snip]
>>          with open(config_file, "w+") as cf:
>>              cf.write(self.config)
>> +        # dump the config to the logfile for easy debugging
>> +        self.logfile.write("> config:\n" + self.config)
>> +        self.logfile.flush()
> 
> Although the variable is named 'comfig', it is in fact a defconfig.

Good point. I will rename it (not the variable, of course) in the commit log and
in the logfile.

> Also, it is easy to miss exactly where the end of the config is, so
> maybe:
> 
>   - prefix all lines with 'config: ',
> or
>   - add 'start config' and 'end config'.

The second one seems nicer to me, I will use '> start defconfig' and
'> end defconfig'.

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

This is the only tag I won't keep, since I am changing this patch.

I will also account for your comment on the last patch. Thank you for the hint.

I am marking patches 2 to 4 as Changes Requested.
Patch 1 (developers file only) I will keep in patchwork as-is.

Regards,
Ricardo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH v2 1/3] testing/infra/builder: dump defconfig to log
  2017-07-23  4:20 ` [Buildroot] [PATCH 2/4] testing/infra/builder: dump config to log Ricardo Martincoski
  2017-07-23  9:14   ` Yann E. MORIN
@ 2017-07-23 21:44   ` Ricardo Martincoski
  2017-07-23 21:44     ` [Buildroot] [PATCH v2 2/3] support/testing: fix run-tests -j Ricardo Martincoski
                       ` (2 more replies)
  1 sibling, 3 replies; 13+ messages in thread
From: Ricardo Martincoski @ 2017-07-23 21:44 UTC (permalink / raw)
  To: buildroot

The defconfig is composed on-the-fly by test infra + tests.

Dump it to the logfile before running 'make olddefconfig' so it can
easily analysed when debugging.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Changes v1 -> v2:
  - it's really a defconfig, not a config (Yann E. MORIN);
  - make clear on the logfile where the defconfig ends (Yann E. MORIN);
  - remove tested-by tag since I changed the patch;
  - patch renumbered since I kept the old patch 1 (developers file only)
    in the patchwork as-is;
---
 support/testing/infra/builder.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/support/testing/infra/builder.py b/support/testing/infra/builder.py
index a475bb0a30..905b127c91 100644
--- a/support/testing/infra/builder.py
+++ b/support/testing/infra/builder.py
@@ -17,6 +17,10 @@ class Builder(object):
         config_file = os.path.join(self.builddir, ".config")
         with open(config_file, "w+") as cf:
             cf.write(self.config)
+        # dump the defconfig to the logfile for easy debugging
+        self.logfile.write("> start defconfig\n" + self.config +
+                           "> end defconfig\n")
+        self.logfile.flush()
 
         cmd = ["make",
                "O={}".format(self.builddir),
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH v2 2/3] support/testing: fix run-tests -j
  2017-07-23 21:44   ` [Buildroot] [PATCH v2 1/3] testing/infra/builder: dump defconfig " Ricardo Martincoski
@ 2017-07-23 21:44     ` Ricardo Martincoski
  2017-07-23 21:44     ` [Buildroot] [PATCH v2 3/3] testing/infra/basetest: move jlevel logic to constructor Ricardo Martincoski
  2017-07-24 15:55     ` [Buildroot] [PATCH v2 1/3] testing/infra/builder: dump defconfig to log Thomas Petazzoni
  2 siblings, 0 replies; 13+ messages in thread
From: Ricardo Martincoski @ 2017-07-23 21:44 UTC (permalink / raw)
  To: buildroot

Since commit cf3cd4388a652c9af27ef1c35622e2d0a55b99a9 the -j option is
silently ignored.

The configuration lines are processed using '\n'.join().
This function adds intervening occurrences of the separator, but the
resulting string does not end at a separator.
 >>> "n".join(["a","b"])
 'anb'
It results in a defconfig that does not end in a newline.

When BR2_JLEVEL is added by -j logic to the defconfig it ends up
concatenated to the last line of the defconfig.
 BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM=yBR2_JLEVEL=7
The resulting .config has the default BR2_JLEVEL=0.

Instead of just workaround this problem by adding a newline before
BR2_JLEVEL when -j is used, make the defconfig to end in a newline since
it is a more future-proof solution.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Changes v1 -> v2:
  - no functional change;
  - commit log adjusted to be consistent with previous patch
    (config->defconfig, based on comment from Yann E. MORIN in the
    previous patch);
  - patch renumbered since I kept the old patch 1 (developers file only)
    in the patchwork as-is;
---
 support/testing/infra/basetest.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py
index 07c180e232..29e7872572 100644
--- a/support/testing/infra/basetest.py
+++ b/support/testing/infra/basetest.py
@@ -41,7 +41,8 @@ class BRTest(unittest.TestCase):
         self.testname = self.__class__.__name__
         self.builddir = self.outputdir and os.path.join(self.outputdir, self.testname)
         self.emulator = None
-        self.config = '\n'.join([line.lstrip() for line in self.config.splitlines()])
+        self.config = '\n'.join([line.lstrip() for line in
+                                 self.config.splitlines()]) + '\n'
 
     def show_msg(self, msg):
         print "{} {:40s} {}".format(datetime.datetime.now().strftime("%H:%M:%S"),
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH v2 3/3] testing/infra/basetest: move jlevel logic to constructor
  2017-07-23 21:44   ` [Buildroot] [PATCH v2 1/3] testing/infra/builder: dump defconfig " Ricardo Martincoski
  2017-07-23 21:44     ` [Buildroot] [PATCH v2 2/3] support/testing: fix run-tests -j Ricardo Martincoski
@ 2017-07-23 21:44     ` Ricardo Martincoski
  2017-07-24 15:55     ` [Buildroot] [PATCH v2 1/3] testing/infra/builder: dump defconfig to log Thomas Petazzoni
  2 siblings, 0 replies; 13+ messages in thread
From: Ricardo Martincoski @ 2017-07-23 21:44 UTC (permalink / raw)
  To: buildroot

As suggested by Arnout in [1].

While at it, simplify the logic by always appending the BR2_JLEVEL and
defaulting to 0 (the value copied from Config.in is used for 5 years now
and is very unlikely to change).

[1] http://patchwork.ozlabs.org/patch/790525/

Suggested-by: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Changes v1 -> v2:
  - no functional change;
  - keep Cc: in commit log (Yann E. MORIN);
  - patch renumbered since I kept the old patch 1 (developers file only)
    in the patchwork as-is;
---
 support/testing/infra/basetest.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py
index 29e7872572..431605b23f 100644
--- a/support/testing/infra/basetest.py
+++ b/support/testing/infra/basetest.py
@@ -34,7 +34,7 @@ class BRTest(unittest.TestCase):
     outputdir = None
     logtofile = True
     keepbuilds = False
-    jlevel = None
+    jlevel = 0
 
     def __init__(self, names):
         super(BRTest, self).__init__(names)
@@ -43,16 +43,14 @@ class BRTest(unittest.TestCase):
         self.emulator = None
         self.config = '\n'.join([line.lstrip() for line in
                                  self.config.splitlines()]) + '\n'
+        self.config += "BR2_JLEVEL={}\n".format(self.jlevel)
 
     def show_msg(self, msg):
         print "{} {:40s} {}".format(datetime.datetime.now().strftime("%H:%M:%S"),
                                     self.testname, msg)
     def setUp(self):
         self.show_msg("Starting")
-        config = self.config
-        if self.jlevel:
-            config += "BR2_JLEVEL={}\n".format(self.jlevel)
-        self.b = Builder(config, self.builddir, self.logtofile)
+        self.b = Builder(self.config, self.builddir, self.logtofile)
 
         if not self.keepbuilds:
             self.b.delete()
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH v2 1/3] testing/infra/builder: dump defconfig to log
  2017-07-23 21:44   ` [Buildroot] [PATCH v2 1/3] testing/infra/builder: dump defconfig " Ricardo Martincoski
  2017-07-23 21:44     ` [Buildroot] [PATCH v2 2/3] support/testing: fix run-tests -j Ricardo Martincoski
  2017-07-23 21:44     ` [Buildroot] [PATCH v2 3/3] testing/infra/basetest: move jlevel logic to constructor Ricardo Martincoski
@ 2017-07-24 15:55     ` Thomas Petazzoni
  2 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2017-07-24 15:55 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 23 Jul 2017 18:44:16 -0300, Ricardo Martincoski wrote:
> The defconfig is composed on-the-fly by test infra + tests.
> 
> Dump it to the logfile before running 'make olddefconfig' so it can
> easily analysed when debugging.
> 
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
> Changes v1 -> v2:
>   - it's really a defconfig, not a config (Yann E. MORIN);
>   - make clear on the logfile where the defconfig ends (Yann E. MORIN);
>   - remove tested-by tag since I changed the patch;
>   - patch renumbered since I kept the old patch 1 (developers file only)
>     in the patchwork as-is;
> ---
>  support/testing/infra/builder.py | 4 ++++
>  1 file changed, 4 insertions(+)

Series applied. Thanks!

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 1/4] DEVELOPERS: add Ricardo Martincoski for support/testing
  2017-07-23  4:20 [Buildroot] [PATCH 1/4] DEVELOPERS: add Ricardo Martincoski for support/testing Ricardo Martincoski
                   ` (2 preceding siblings ...)
  2017-07-23  4:20 ` [Buildroot] [PATCH 4/4] testing/infra/basetest: move jlevel logic to constructor Ricardo Martincoski
@ 2017-07-25 20:20 ` Thomas Petazzoni
  3 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2017-07-25 20:20 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 23 Jul 2017 01:20:16 -0300, Ricardo Martincoski wrote:
> While at it, also move my professional entry near my personal one.
> 
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
> ---
>  DEVELOPERS | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Applied to master, thanks.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-07-25 20:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-23  4:20 [Buildroot] [PATCH 1/4] DEVELOPERS: add Ricardo Martincoski for support/testing Ricardo Martincoski
2017-07-23  4:20 ` [Buildroot] [PATCH 2/4] testing/infra/builder: dump config to log Ricardo Martincoski
2017-07-23  9:14   ` Yann E. MORIN
2017-07-23 18:44     ` Ricardo Martincoski
2017-07-23 21:44   ` [Buildroot] [PATCH v2 1/3] testing/infra/builder: dump defconfig " Ricardo Martincoski
2017-07-23 21:44     ` [Buildroot] [PATCH v2 2/3] support/testing: fix run-tests -j Ricardo Martincoski
2017-07-23 21:44     ` [Buildroot] [PATCH v2 3/3] testing/infra/basetest: move jlevel logic to constructor Ricardo Martincoski
2017-07-24 15:55     ` [Buildroot] [PATCH v2 1/3] testing/infra/builder: dump defconfig to log Thomas Petazzoni
2017-07-23  4:20 ` [Buildroot] [PATCH 3/4] support/testing: fix run-tests -j Ricardo Martincoski
2017-07-23  9:01   ` Yann E. MORIN
2017-07-23  4:20 ` [Buildroot] [PATCH 4/4] testing/infra/basetest: move jlevel logic to constructor Ricardo Martincoski
2017-07-23  9:20   ` Yann E. MORIN
2017-07-25 20:20 ` [Buildroot] [PATCH 1/4] DEVELOPERS: add Ricardo Martincoski for support/testing Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox