On Thu, Jul 17, 2025 at 01:34:13PM +0300, Manos Pitsidianakis wrote: > Add argument parsing to functional tests to improve developer experience > when running individual tests. All logs are printed to stdout > interspersed with TAP output. > > Example usage, assuming current build directory with qemu source code in > the parent directory (see docs/devel/testing/functional.rst for details): > > $ export PYTHONPATH=../python:../tests/functional > $ export QEMU_TEST_QEMU_BINARY="$(pwd)/qemu-system-aarch64" > $ ./pyvenv/bin/python3 ../tests/functional/test_aarch64_virt.py --help > usage: test_aarch64_virt [-h] [-d] > > QEMU Functional test > > options: > -h, --help show this help message and exit > -d, --debug Also print test and console logs on stdout. This will > make the TAP output invalid and is meant for debugging > only. > > Signed-off-by: Manos Pitsidianakis <manos.pitsidiana...@linaro.org> > --- > Changes in v2: > - Store stdout handler in `self` object (thanks Daniel) > - Deduplicate handler removal code (Daniel) > - Amend commit description to mention PYTHONPATH (thanks Alex) > - Link to v1: > https://lore.kernel.org/qemu-devel/20250716-functional_tests_debug_arg-v1-1-6a9cd6831...@linaro.org
You've ignored my v1 review requests that the code for creating log handlers should be moved into a helper method in util.py, and likewise that the argparse code moved into util.py, and thus not called in both main & setUp. 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 :|