qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: "Peter Maydell" <peter.maydell@linaro.org>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: Functional tests precache behaviour
Date: Thu, 1 May 2025 14:26:17 -0700	[thread overview]
Message-ID: <90c34e5a-c98b-4ee1-a176-d747c47b853b@linaro.org> (raw)
In-Reply-To: <CAFEAcA-G7exikg_qa7USDvfo0+ZTLUiymfDiqK6wLTZmebv4kQ@mail.gmail.com>

On 5/1/25 10:56 AM, Peter Maydell wrote:
> On Wed, 30 Apr 2025 at 17:41, Daniel P. Berrangé <berrange@redhat.com> wrote:
>> FWIW, if you want to run a specific test, personally don't use meson
>> or make, as you can just invoke the file directly:
>>
>>   $ QEMU_TEST_QEMU_BINARY=./build/qemu-system-x86_64 \
>>     PYTHONPATH=./python \
>>     ./tests/functional/test_x86_cpu_model_versions.py
> 
> The rune in docs/devel says you also need to:
>   * put tests/functional on the PYTHONPATH too
>   * run from the build tree, not the source tree
>   * run using the python binary in pyvenv/
> 
> So you can do this, but it's pretty clunky; I have to
> look up the runes every time. It would be nice if there
> was a wrapper to do this for you.
> 

I think that meson test command is pretty easy and "standard" (once 
learned, you can apply this to any other project using meson test 
infrastructure), so maybe it's the wrapper we could be interested to 
promote.

If we go this way, two things would be interesting to change:
- enable setup thorough by default, so all tests are visible by default 
(instead of having to dive into tests/meson.build, and understand which 
setup does what). make check-functional can still restrict the setup, 
it's not a problem.
- abort gracefully (without needing an extra env var) when an asset is 
missing and can't be downloaded, with a different error than 404.

With those two changes, "meson test" does all we need, including the 
build, in an intuitive and standard way.

> (Also it doesn't work if the thing you're trying to test
> is "does this test pass within the meson test timeout" :-))
> 
> IIRC there is also a rune for "run a single test within make/meson",
> but I forget what it is and docs/devel/testing/functional.rst
> doesn't mention it.
>

I agree with you that even though it's possible, it's something you need 
to check in the documentation everytime, which is not convenient.

> thanks
> -- PMM



  reply	other threads:[~2025-05-01 21:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-30 14:34 Functional tests precache behaviour Pierrick Bouvier
2025-04-30 15:00 ` Thomas Huth
2025-04-30 15:48   ` Pierrick Bouvier
2025-04-30 16:02     ` Daniel P. Berrangé
2025-04-30 16:21       ` Pierrick Bouvier
2025-04-30 16:29         ` Daniel P. Berrangé
2025-04-30 16:34           ` Pierrick Bouvier
2025-04-30 16:39             ` Daniel P. Berrangé
2025-04-30 16:46               ` Pierrick Bouvier
2025-05-01 17:56               ` Peter Maydell
2025-05-01 21:26                 ` Pierrick Bouvier [this message]
2025-05-03 20:21                   ` Pierrick Bouvier
2025-04-30 16:22   ` Pierrick Bouvier

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=90c34e5a-c98b-4ee1-a176-d747c47b853b@linaro.org \
    --to=pierrick.bouvier@linaro.org \
    --cc=berrange@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).