[PATCH v7 04/11] test: Introduce the concept of a role

Tom Rini trini at konsulko.com
Thu Oct 31 23:19:01 CET 2024


On Thu, Oct 31, 2024 at 07:01:56PM +0100, Simon Glass wrote:
> Hi Tom,
> 
> On Wed, 30 Oct 2024 at 00:53, Tom Rini <trini at konsulko.com> wrote:
> >
> > On Wed, Oct 09, 2024 at 07:51:38PM -0600, Simon Glass wrote:
> >
> > > In Labgrid there is the concept of a 'role', which is similar to the
> > > U-Boot board ID in U-Boot's pytest subsystem.
> > >
> > > The role indicates both the target and information about the U-Boot
> > > build to use. It can also provide any amount of other configuration.
> > > The information is obtained using the 'labgrid-client query' operation.
> > >
> > > Make use of this in tests, so that only the role is required in gitlab
> > > and other situations. The board type and other things can be queried
> > > as needed.
> > >
> > > Use a new 'u-boot-test-getrole' script to obtain the requested
> > > information.
> > >
> > > With this it is possible to run lab tests in gitlab with just a single
> > > 'ROLE' variable for each board.
> > >
> > > Signed-off-by: Simon Glass <sjg at chromium.org>
> >
> > Aside from the "look ma, only one conf file" trick, I still do not see how
> > this differs from the typical board/id system we use today. One can
> > easily make N symlinks to the generic conf file.
> 
> You can still do that if you like. I have always found that approach
> confusing, so I prefer the configuration to be in Labgrid. It also
> allows me to connect to the boards using an interactive console,
> something that isn't possible without some kind of mapping.

This is where we get to the point where I honestly don't know. On the
one hand, there's the position I usually take. Minimize changes that are
due to preferences and locally wrap things as needed. I have a wrapper
around buildman for example, for the tasks I need. I have wrappers
around labgrid. There's a few things mine does that yours doesn't but
there's a few things your does that mine doesn't. On the other hand, I'm
sure I'm not optimally using labgrid for managing the lab. My hesitation
boils down to that your implementation seems phrased / positioned as the
only way to do things. And no two labs are alike.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20241031/7dcfa210/attachment.sig>


More information about the U-Boot mailing list