[PATCH v2 10/13] test: add first sample tests

Jan Lübbe jlu at pengutronix.de
Thu Jun 3 08:14:41 PDT 2021


On Wed, 2021-06-02 at 13:35 +0200, Ahmad Fatoum wrote:
> > > +def get_config(command):
> > > +    """Returns the enabled config options of barebox, either from
> > > +    a running instance if supported or by looking into .config
> > > +    in the build directory.
> > > +    Args:
> > > +        command (BareboxDriver): An instance of the BareboxDriver
> > > +    Returns:
> > > +        list: list of the enabled config options
> > > +    """
> > > +    assert isinstance(command, BareboxDriver)
> > > +
> > > +    out, err, returncode = command.run("cat /env/data/config")
> > > +    if returncode != 0:
> > > +        try:
> > > +            with open(os.environ['LG_BUILDDIR'] + "/.config") as f:
> > 
> > Please don't use the LG_ namespace currently used by labgrid, this
> > variable is introduced by your wrapper script, something like
> > BB_LG_BUILDDIR indicates that this is only used in the barebox test
> > scripts.
> 
> Labgrid filters out anything that doesn't start with LG_ AFAIK.

No. The filter is only for the environment templating. We don't touch the
os.environ dictionary.

Regards,
Jan
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




More information about the barebox mailing list