[U-Boot] [PATCHv2 10/13] test/py: Rework test.py to be a different kind of wrapper

Tom Rini trini at konsulko.com
Wed Oct 23 17:12:12 UTC 2019


On Wed, Oct 23, 2019 at 11:03:38AM -0600, Stephen Warren wrote:
> On 10/23/19 10:58 AM, Tom Rini wrote:
> > On Wed, Oct 23, 2019 at 10:55:57AM -0600, Stephen Warren wrote:
> > > On 10/22/19 9:20 PM, Tom Rini wrote:
> > > > Now that we have moved to being based on pytest for python3 we need to
> > > > make our test.py wrapper more robust in terms of only calling python3
> > > > rather than possibly finding and using python2.  To do this, change from
> > > > execvp()'ing pytest to invoking the package itself via python.  In the
> > > > event that pytest is unavailable we still get a user-friendly error:
> > > 
> > > I guess if this works, it's fine. But I think it'd work just as well to
> > > simply s/py.test/py.test-3/ in the existing code?
> > 
> > We can't because pip only provides "py.test" / "pytest" binaries.
> 
> Hmm. It sucks that virtualenv does things differently to Ubuntu packaging
> then. That means this series will probably break my test system, which
> doesn't use virtualenv. I guess I'll apply it and see.

This should be what works everywhere tho.  Instead of hoping that
"py.test" will be the right python version we tell python3 to use the
pytest module it has.  So if you have system python3-pytest, that works,
if you (python3) pip install pytest locally, that works and if you
virtualenv + python3 + pip install pytest, that works.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191023/76ecef23/attachment.sig>


More information about the U-Boot mailing list