On Wed, Sep 28, 2022 at 1:14 PM Thomas Huth <[email protected]> wrote:
>
> On 28/09/2022 09.06, Daniel P. Berrangé wrote:
> > On Tue, Sep 27, 2022 at 06:09:22PM -0400, Michael S. Tsirkin wrote:
> >> On Tue, Sep 27, 2022 at 11:44:56PM +0200, Paolo Bonzini wrote:
> >>> I also second the idea of using avocado instead of pytest, by the way.
> >
> > snip
> >
> >> Problem is I don't think avocado is yet at the level where I can
> >> ask random developers to use it to check their ACPI patches.
> >>
> >> I just went ahead and rechecked and the situation isn't much better
> >> yet. I think the focus of avocado is system testing of full guests with
> >> KVM, not unit testing of ACPI.
> >>
> >> Let's start with installation on a clean box:
> >
> > ...snip...
> >
> > Do not do any of this stuff, it is irrelevant to QEMU's needs.
> > A developer using Avocado with QEMU does nothing more than:
> >
> > make check-avocado
>
> Right. And if you want to run individual tests, you can also do it like this:
>
> make check-venv # Only for the first time
> ./tests/venv/bin/avocado run tests/avocado/boot_linux.py
Ok this seems to work after I did a pip3 install of avocado in the host.
./tests/venv/bin/avocado run tests/avocado/version.py
JOB ID : 8dd90b1cb5baf3780cc764ca4a1ae838374a0a5f
JOB LOG :
/home/anisinha/avocado/job-results/job-2022-10-09T10.48-8dd90b1/job.log
(1/1) tests/avocado/version.py:Version.test_qmp_human_info_version:
PASS (0.04 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0
| CANCEL 0
JOB TIME : 3.51 s
I see that the output is not tap compliant like the qtests tests are.
how do I choose tap?
./tests/venv/bin/avocado-runner-tap --help
usage: avocado-runner-tap [-h]
{capabilities,runnable-run,runnable-run-recipe,task-run,task-run-recipe}
...
nrunner application for executable tests that produce TAP
positional arguments:
{capabilities,runnable-run,runnable-run-recipe,task-run,task-run-recipe}
capabilities Outputs capabilities, including runnables and commands
runnable-run Runs a runnable definition from arguments
runnable-run-recipe
Runs a runnable definition from a recipe
task-run Runs a task from arguments
task-run-recipe Runs a task from a recipe
options:
-h, --help show this help message and exit
>
> Or run tests via tags (very convenient for maintainers):
>
> ./tests/venv/bin/avocado run -t arch:s390x tests/avocado/
>
> HTH,
> Thomas
>