All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org, "Thomas Huth" <thuth@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [RFC PATCH] tests/functional: expose sys.argv to unittest.main
Date: Fri, 25 Jul 2025 15:49:22 +0100	[thread overview]
Message-ID: <aIOZcgH_NfGOtHnO@redhat.com> (raw)
In-Reply-To: <20250725144142.3041931-1-alex.bennee@linaro.org>

On Fri, Jul 25, 2025 at 03:41:42PM +0100, Alex Bennée wrote:
> With this we can call the supported we can take advantage of the
> argument the module supports:
> 
>   env PYTHONPATH=/home/alex/lsrc/qemu.git/python:/home/alex/lsrc/qemu.git/tests/functional ./pyvenv/bin/python /home/alex/lsrc/qemu.git/tests/functional/test_aarch64_kvm.py --help
>   usage: test_aarch64_kvm.py [-h] [-v] [-q] [--locals] [--durations N] [-f] [-c] [-b] [-k TESTNAMEPATTERNS] [tests ...]
> 
>   positional arguments:
>     tests                a list of any number of test modules, classes and test methods.
> 
>   options:
>     -h, --help           show this help message and exit
>     -v, --verbose        Verbose output
>     -q, --quiet          Quiet output
>     --locals             Show local variables in tracebacks
>     --durations N        Show the N slowest test cases (N=0 for all)
>     -f, --failfast       Stop on first fail or error
>     -c, --catch          Catch Ctrl-C and display results so far
>     -b, --buffer         Buffer stdout and stderr during tests
>     -k TESTNAMEPATTERNS  Only run tests which match the given substring
> 
>   Examples:
>     test_aarch64_kvm.py test_module               - run tests from test_module
>     test_aarch64_kvm.py module.TestClass          - run tests from module.TestClass
>     test_aarch64_kvm.py module.Class.test_method  - run specified test method
>     test_aarch64_kvm.py path/to/test_file.py      - run tests from test_file.py
> 
>   usage: test_aarch64_kvm.py discover [-h] [-v] [-q] [--locals] [--durations N] [-f] [-c] [-b] [-k TESTNAMEPATTERNS] [-s START] [-p PATTERN] [-t TOP]
> 
>   options:
>     -h, --help            show this help message and exit
>     -v, --verbose         Verbose output
>     -q, --quiet           Quiet output
>     --locals              Show local variables in tracebacks
>     --durations N         Show the N slowest test cases (N=0 for all)
>     -f, --failfast        Stop on first fail or error
>     -c, --catch           Catch Ctrl-C and display results so far
>     -b, --buffer          Buffer stdout and stderr during tests
>     -k TESTNAMEPATTERNS   Only run tests which match the given substring
>     -s, --start-directory START
>                           Directory to start discovery ('.' default)
>     -p, --pattern PATTERN
>                           Pattern to match tests ('test*.py' default)
>     -t, --top-level-directory TOP
>                           Top level directory of project (defaults to start directory)
> 
>   For test discovery all test modules must be importable from the top level directory of the project.
> 
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/functional/qemu_test/testcase.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2025-07-25 14:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-25 14:41 [RFC PATCH] tests/functional: expose sys.argv to unittest.main Alex Bennée
2025-07-25 14:49 ` Daniel P. Berrangé [this message]
2025-07-28  9:45 ` Philippe Mathieu-Daudé

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=aIOZcgH_NfGOtHnO@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=philmd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.