[Avocado-devel] "No tests references provided ..." using --mux-yaml
Lukáš Doktor
ldoktor at redhat.com
Wed Jul 11 16:48:49 UTC 2018
Dne 10.7.2018 v 21:05 Eduardo Habkost napsal(a):
> Hi,
>
> I'm trying to use --mux-yaml to run multiple variants of a test
> case. I managed to write a multiplexer yaml file but it doesn't
> seem to work with "avocado run". What I'm doing wrong here?
>
> [qemu/work/x86-cpuid-testcases>]$ avocado --version
> Avocado 62.0
> [qemu/work/x86-cpuid-testcases>]$ cat tests/acceptance/guest_abi.yaml
> machine: !mux
> pc-i440fx-2.12:
> machine: pc-i440fx-2.12
> pc-q35-2.12:
> machine: pc-q35-2.12
> cpu: !mux
> qemu64:
> cpu: qemu64
> qemu32:
> cpu: qemu32
> [qemu/work/x86-cpuid-testcases>]$ avocado list tests/acceptance/guest_abi.py
> INSTRUMENTED tests/acceptance/guest_abi.py:GuestABI.test_mtree
> [qemu/work/x86-cpuid-testcases>]$ avocado variants -m tests/acceptance/guest_abi.yaml
> Multiplex variants (4):
> Variant qemu64-pc-i440fx-2.12-525f: /run/machine/pc-i440fx-2.12, /run/cpu/qemu64
> Variant qemu32-pc-i440fx-2.12-36dd: /run/machine/pc-i440fx-2.12, /run/cpu/qemu32
> Variant qemu64-pc-q35-2.12-0d82: /run/machine/pc-q35-2.12, /run/cpu/qemu64
> Variant qemu32-pc-q35-2.12-1dec: /run/machine/pc-q35-2.12, /run/cpu/qemu32
> [qemu/work/x86-cpuid-testcases>]$ avocado run --mux-yaml tests/acceptance/guest_abi.yaml tests/acceptance/guest_abi.py
>
This is because `--mux-yaml` accepts multiple arguments, therefor it consumes the test as yet another argument, leaving the job with no tests to be discovered. See http://avocado-framework.readthedocs.io/en/latest/GetStartedGuide.html#running-tests for details but basically you have two options, explicit (using `--` to separate named arguments and positional arguments):
avocado run --mux-yaml tests/acceptance/guest_abi.yaml -- tests/acceptance/guest_abi.py
or reorder (which is a bit hacky, but works)
avocado run tests/acceptance/guest_abi.py --mux-yaml tests/acceptance/guest_abi.yaml
Regards,
Lukáš
> No test references provided nor any other arguments resolved into tests. Please double check the executed command.
> [qemu/work/x86-cpuid-testcases>]$
>
> guest_abi.py is the file at https://github.com/ehabkost/qemu-hacks/blob/work/x86-cpuid-testcases/tests/acceptance/guest_abi.py
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20180711/56173701/attachment.sig>
More information about the Avocado-devel
mailing list