qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "John Snow" <jsnow@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>
Cc: "Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
	qemu-devel@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Gustavo Romero" <gustavo.romero@linaro.org>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>
Subject: Re: [PATCH] tests/functional: add --debug CLI arg
Date: Thu, 24 Jul 2025 21:47:01 +0200	[thread overview]
Message-ID: <f208a06d-2dfe-4cce-a848-938b3e3b6a31@redhat.com> (raw)
In-Reply-To: <CAFn=p-YTFYr-cxz0B8jay=-HVpjyo9To72DZAg5o45SRBR0wnA@mail.gmail.com>

On 21/07/2025 22.38, John Snow wrote:
> On Thu, Jul 17, 2025 at 4:44 AM Alex Bennée <alex.bennee@linaro.org> wrote:
...
>> Am I holding it wrong?
>>
>>    ➜  ./pyvenv/bin/python ../../tests/functional/test_aarch64_virt.py --help
>>    Traceback (most recent call last):
>>      File "/home/alex/lsrc/qemu.git/builds/all/../../tests/functional/test_aarch64_virt.py", line 16, in <module>
>>        from qemu_test import QemuSystemTest, Asset, exec_command_and_wait_for_pattern
>>      File "/home/alex/lsrc/qemu.git/tests/functional/qemu_test/__init__.py", line 14, in <module>
>>        from .testcase import QemuBaseTest, QemuUserTest, QemuSystemTest
>>      File "/home/alex/lsrc/qemu.git/tests/functional/qemu_test/testcase.py", line 26, in <module>
>>        from qemu.machine import QEMUMachine
>>    ModuleNotFoundError: No module named 'qemu'
>>
>> I thought the point of the venv is we had all the modules we need
>> automatically available to the PYTHONPATH?
> 
> As Thomas points out, "qemu" is special since it's already in the
> tree. There has been some dragging-of-feet by yours-truly because
> installing the "qemu" module by default when running configure
> introduces a considerable startup lag time, and the module is not
> actually needed for the simple configuration and building of QEMU -
> only testing.
> 
> It's something I want to fix, but must admit to being a bit stumped as
> to how I will bridge that gap long term. Currently, all of the modules
> we need are in the tree with no dependencies, so it can be fixed with
> a simple PYTHONPATH hack. However, if I actually remove the QMP
> library from the tree like I have wanted to, then we need pip to do a
> real install and process dependencies, and this creates some
> complications and extra startup lag.

Wouldn't it be possible to add the module as a wheel in python/wheels/ ? 
That's maybe the easiest solution, isn't it?

> Naively, I think adding a "just in time installation of testing
> dependencies" when you go to run a testing command from "make XXXX"
> might be sufficient for us, possibly in conjunction with a configure
> flag that lets you pre-load testing dependencies.

We could likely re-use "make check-venv" for the functional tests ... it's 
already installed in that case. However, you then still have to remember to 
call it first before you can run a test directly, without the Makefile wrappers.

  Thomas



  reply	other threads:[~2025-07-24 19:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-16  6:08 [PATCH] tests/functional: add --debug CLI arg Manos Pitsidianakis
2025-07-16 16:23 ` Pierrick Bouvier
2025-07-17  8:42 ` Alex Bennée
2025-07-17  8:46   ` Thomas Huth
2025-07-17 10:36     ` Alex Bennée
2025-07-21  7:25       ` Thomas Huth
2025-07-17  8:47   ` Manos Pitsidianakis
2025-07-17 10:04     ` Alex Bennée
2025-07-17 10:13       ` Manos Pitsidianakis
2025-07-21 20:38   ` John Snow
2025-07-24 19:47     ` Thomas Huth [this message]
2025-08-07 21:46       ` John Snow
2025-09-09 10:37         ` Thomas Huth
2025-09-15 19:54           ` John Snow
2025-09-19  6:13             ` Thomas Huth
2025-07-17  9:21 ` Daniel P. Berrangé
2025-07-17  9:27   ` Manos Pitsidianakis
2025-07-17  9:39     ` Daniel P. Berrangé
2025-07-17 10:02       ` Manos Pitsidianakis

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=f208a06d-2dfe-4cce-a848-938b3e3b6a31@redhat.com \
    --to=thuth@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=gustavo.romero@linaro.org \
    --cc=jsnow@redhat.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).