[Fuego] [PATCH 2/2] ftc: add global name 'board_name'

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Fri May 25 04:22:34 UTC 2018


> -----Original Message-----
> From: Tim.Bird at sony.com [mailto:Tim.Bird at sony.com]
> Sent: Friday, May 25, 2018 1:07 PM
> To: daniel.sangorrin at toshiba.co.jp; liuwl.fnst at cn.fujitsu.com;
> fuego at lists.linuxfoundation.org
> Subject: RE: [Fuego] [PATCH 2/2] ftc: add global name 'board_name'
> 
> 
> 
> > -----Original Message-----
> > From: Daniel Sangorrin
> > Sent: Thursday, May 24, 2018 12:04 AM
> > To: 'Liu Wenlong' <liuwl.fnst at cn.fujitsu.com>;
> > fuego at lists.linuxfoundation.org
> > Subject: Re: [Fuego] [PATCH 2/2] ftc: add global name 'board_name'
> >
> > Ouch I was touching this part of the code and didn't notice Tim's recent
> > commits.
> > Tim: no plans on using argparse?
> 
> I'm not opposed to refactoring and simplifying the argument
> parsing across the board for ftc sub-commands.  I did this
> refactoring as a quick one-off as I was working on a
> (not published yet) new 'ftc set-criteria' command.
> 
> Nothing done here is set in stone, and if you or someone else
> wants to refactor stuff using argparse, I'll be receptive to it.
> What we have now for argument parsing is a real mishmash, which
> I'm not too fond of. But it's rather easy to follow (well - modulo
> dumb bugs like the one I introduced and Liu found).
> 
> One thing that would be good IMHO, would be to always use -b
> to specify a board, always -t for a test, etc.  Some commands use
> positional arguments for items when they are mandatory, which is a
> bit less typing for those commands, but less uniform, and probably
> presents a steeper learning curve.
> What do you think?
>   -- Tim

Yes, I noticed those. I agree that they should be the same for all.
For example, -p was used for test_plans but now it is used also for phases.
I think that long names might be better in some cases. Also ftc add-nodes/rm-nodes does not require the -b option.

I will add argparse refactoring to my growing TODO list ;).

Thanks,
Daniel






More information about the Fuego mailing list