diff mbox series

[1/1] test/py: use actual core count for parallel builds

Message ID 20200530224424.140021-1-xypron.glpk@gmx.de
State Accepted
Commit 371a2e775322bd995a945f108c5c91bde342062a
Headers show
Series [1/1] test/py: use actual core count for parallel builds | expand

Commit Message

Heinrich Schuchardt May 30, 2020, 10:44 p.m. UTC
When building U-Boot we should not blindly use make -j8 but consider the
actual core count given by os.cpu_count().

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 test/py/conftest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.26.2

Comments

Simon Glass May 31, 2020, 2:08 p.m. UTC | #1
On Sat, 30 May 2020 at 16:44, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> When building U-Boot we should not blindly use make -j8 but consider the
> actual core count given by os.cpu_count().
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  test/py/conftest.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>

I did send a patch to make this use buildman, but people were not keen
on the extra dependency.


> diff --git a/test/py/conftest.py b/test/py/conftest.py
> index e3392ff6bc..30920474b3 100644
> --- a/test/py/conftest.py
> +++ b/test/py/conftest.py
> @@ -156,7 +156,7 @@ def pytest_configure(config):
>                  o_opt = ''
>              cmds = (
>                  ['make', o_opt, '-s', board_type + '_defconfig'],
> -                ['make', o_opt, '-s', '-j8'],
> +                ['make', o_opt, '-s', '-j{}'.format(os.cpu_count())],
>              )
>              name = 'make'
>
> --
> 2.26.2
>
Stephen Warren May 31, 2020, 7:14 p.m. UTC | #2
On 5/30/20 4:44 PM, Heinrich Schuchardt wrote:
> When building U-Boot we should not blindly use make -j8 but consider the
> actual core count given by os.cpu_count().

Acked-by: Stephen Warren <swarren at nvidia.com>
diff mbox series

Patch

diff --git a/test/py/conftest.py b/test/py/conftest.py
index e3392ff6bc..30920474b3 100644
--- a/test/py/conftest.py
+++ b/test/py/conftest.py
@@ -156,7 +156,7 @@  def pytest_configure(config):
                 o_opt = ''
             cmds = (
                 ['make', o_opt, '-s', board_type + '_defconfig'],
-                ['make', o_opt, '-s', '-j8'],
+                ['make', o_opt, '-s', '-j{}'.format(os.cpu_count())],
             )
             name = 'make'