On 07/11/2018 03:22 PM, Eduardo Habkost wrote: > On Wed, Jul 11, 2018 at 06:48:49PM +0200, Lukáš Doktor wrote: >> 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 > > Oops. I guess it's too late to change the interface to make it > less confusing? >
We're planning to revisit the command line interface, but sync that with the next LTS release to avoid breaking users' scripts or work flow: https://trello.com/c/irBwjrIa/1365-unify-all-our-multi-argument-arguments-by-using-actionappend Regards! -- Cleber Rosa [ Sr Software Engineer - Virtualization Team - Red Hat ] [ Avocado Test Framework - avocado-framework.github.io ] [ 7ABB 96EB 8B46 B94D 5E0F E9BB 657E 8D33 A5F2 09F3 ]