Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Oguz Ozhan <oguz.ozhan@mind.be>
Cc: Oguz Ozhan <oguz.ozhan@mind.com>,
	Ricardo Martincoski <ricardo.martincoski@datacom.com.br>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/3] support/testing: replace nose2 with pytest - Dockerfile
Date: Sun, 23 Oct 2022 18:44:44 +0200	[thread overview]
Message-ID: <20221023164444.GA1058960@scaer> (raw)
In-Reply-To: <20221021091531.2989489-1-oguz.ozhan@mind.be>

Oguz, All,

On 2022-10-21 11:15 +0200, Oguz Ozhan spake thusly:
> From: Oguz Ozhan <oguz.ozhan@mind.com>
> 
> - From web page of nose2:
> (https://docs.nose2.io/en/latest/)
> nose2 vs pytest:
>   - pytest is an excellent test framework and we encourage users to consider it for new projects.
>   - It has a bigger team of maintainers and a larger community of users.

This clearly states "for new projects", but we are not new! ;-)

Why do we need to switch to pytest, and what does that bring us? (see
below too)

> - pytest is more robust and has more ability compared to nose2

You provide robustness and more abilities to advocate for switching to
pytest, however, you do not explain what is currently broken that would
be fixed by the pytest robustness, or what new features from pytest we
could leverage, and how.

Note that I am not opposed to switching, but we need a good rationale
for switching.

This commit should also come after we actually did the switch, i.e. we
should first convert support/testing/ over to pytest, then modify the
dockerfile accordingly, which allows to write a better coomit log.

Also, please organise your commit logs as (first line is the title):

    support/docker: install pytest instead of nose2

    Now that the tuntime test infra has switched to using pytest instead
    of nose2, install the appropriate packages in the Dockerfile for our
    reference build environment.

    Note that pytest-parallel is not available i Debian Bullseye, so we
    install it (and its depenencies) from Pypi instead.

    Signed-off-by: You

See more below...

> Signed-off-by: Oguz Ozhan <oguz.ozhan@mind.be>
> ---
>  support/docker/Dockerfile | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/support/docker/Dockerfile b/support/docker/Dockerfile
> index f54c31b54a..fd1527b1f9 100644
> --- a/support/docker/Dockerfile
> +++ b/support/docker/Dockerfile
> @@ -38,8 +38,8 @@ RUN apt-get install -y --no-install-recommends \
>          mercurial \
>          openssh-server \
>          python3 \
> +        python3-pip \
>          python3-flake8 \
> -        python3-nose2 \
>          python3-pexpect \
>          python3-pytest \
>          qemu-system-arm \
> @@ -53,6 +53,9 @@ RUN apt-get install -y --no-install-recommends \
>      apt-get -y autoremove && \
>      apt-get -y clean
>  
> +# To be able to run tests in parallel
> +RUN pip install pytest-parallel

Please, pin the version so that the image is reproducible.

Also, if pytest-parallel has dependencies, explicitly install those at
pinned versions too.

Also note in the commit log that pytest-parallel is not available in
bullseye, so we need to get it from Pypi instead (as in my suggestion).

Regards,
Yann E. MORIN.

>  # To be able to generate a toolchain with locales, enable one UTF-8 locale
>  RUN sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen && \
>      /usr/sbin/locale-gen
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2022-10-23 16:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21  9:15 [Buildroot] [PATCH 1/3] support/testing: replace nose2 with pytest - Dockerfile Oguz Ozhan
2022-10-21  9:15 ` [Buildroot] [PATCH 2/3] support/testing: replace nose2 with pytest - run-tests Oguz Ozhan
2022-10-23 16:51   ` Yann E. MORIN
2022-10-30 22:20   ` Ricardo Martincoski
2022-10-21  9:15 ` [Buildroot] [PATCH 3/3] support/testing: replace nose2 with pytest - CI Oguz Ozhan
2022-10-30 22:20   ` Ricardo Martincoski
2022-10-23 16:44 ` Yann E. MORIN [this message]
2022-10-30 22:17 ` [Buildroot] [PATCH 1/3] support/testing: replace nose2 with pytest - Dockerfile Ricardo Martincoski
  -- strict thread matches above, loose matches on Subject: below --
2022-10-19 21:57 Oguz Ozhan
2022-10-21  7:44 ` Thomas Petazzoni via buildroot
2022-10-21  9:18   ` Oguz Ozhan

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=20221023164444.GA1058960@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=oguz.ozhan@mind.be \
    --cc=oguz.ozhan@mind.com \
    --cc=ricardo.martincoski@datacom.com.br \
    /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