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?

-- 
Eduardo

Reply via email to