[Fuego] [PATCH] ftc: improve test class and defaults handling

Tim.Bird at sony.com Tim.Bird at sony.com
Wed Aug 1 16:40:04 UTC 2018



> -----Original Message-----
> From: Tim.Bird at sony.com
> > -----Original Message-----
> > From: Daniel Sangorrin
> >
> > > -----Original Message-----
> > > From: Tim.Bird at sony.com <Tim.Bird at sony.com>
> > > Did you see my other comments in the atch review? Especially please
> look
> > at my last
> > > one, and review my setup of spec_name, when no -s option is specified.
> >
> > Oops sorry, somehow I missed them because my screen was too narrow
> and
> > was wrapping your comments.
> >
> > > > > +class test_class:
> > > > > +    DEFAULT_DEFAULTS = {
> > > > > +        'timeout' : '30m',
> > > > > +        'spec'    : 'default',
> > > > > +        'reboot'  : 'false',
> > > > > +        'rebuild' : 'false',
> > > > > +        'precleanup'  : 'true',
> > > > > +        'postcleanup' : 'true'
> > > > > +    }
> > > >
> > > > Would be nice to read these from fuego.conf.
> >
> > OK.
> > Do you want fuego.conf parameters to override DEFAULT_DEFAULTS or
> > actually create DEFAULT_DEFAULTS from fuego.conf?
> create DEFAULT_DEFAULTS from fuego.conf.

Thinking about this more, I was wrong.  In the case where fuego.conf
does not have the default flag values specified, ftc will have to have
some values in DEFAULT_DEFAULTS anyway.  There must always
be some default value for a flag, even if it's not specified anywhere
else.  And the correct place for that is inside ftc itself.

So, your first option is the correct one: fuego.conf parameters should
override DEFAULT_DEFAULTS.

So the run/job flag precedence should be:
command line flags >
   testplan per-test flags >
      testplan default_xxx flags >
          fuego.conf flags >
              DEFAULT_DEFAULTS (ftc built-in flags)

 -- Tim




More information about the Fuego mailing list