On Thu, Aug 23, 2018 at 4:27 PM Eduardo Habkost <[email protected]> wrote:
>
> On Thu, Aug 23, 2018 at 11:08:54AM +0200, Amador Pahim wrote:
> > On Thu, Aug 23, 2018 at 5:44 AM Eduardo Habkost <[email protected]> wrote:
> > >
> > > Hi,
> > >
> > > I am reading the docs about test parameters[1][2][3], and I
> > > learned how to access them inside the test code.  But I couldn't
> > > find one piece of information: what's the simplest way to _pass_
> > > parameters to tests?
> >
> > avocado run --mux-inject 'foo:bar' -- test.py
> >
> > ("--mux-inject   Inject [path:]key:node values into the final multiplex 
> > tree.")
>
> Thanks!  This looks like what I'm looking for.
>
> I'm surprised that a core test API feature (test parameters) can
> only be used through an optional plugin (yaml_to_mux).

Well, the Varianter API[1] can receive variants from anywhere. Each
variant will carry the parameters that will be exposed for a test to
consume.
Yes, right now the only one[2] sending variants to the Varianter API
is the yaml_to_mux plugin.
It would be easy to create a "simple parameter interface", closer to
the core package, that would create one variant will all the
parameters you want, i.e. from the command line. But someone has to
write that internal plugin :)

[1] - 
https://avocado-framework.readthedocs.io/en/latest/TestParameters.html#test-parameters
[2] - Apart from varianter_pict and varianter_cit plugins

>
> --
> Eduardo



-- 
Pahim

Reply via email to