]> git.baikalelectronics.ru Git - uboot.git/commit
test/py: Rework test.py to be a different kind of wrapper
authorTom Rini <trini@konsulko.com>
Thu, 24 Oct 2019 15:59:25 +0000 (11:59 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 30 Oct 2019 21:48:47 +0000 (17:48 -0400)
commit49ee0e2cc509e24ecc73de6737dce5870c72c85c
tree3a3d158ad1582e54e578f6e5e4ef8c9aa49ac254
parentae81389bb94d8c646f7fad187fb42e10a6190f75
test/py: Rework test.py to be a different kind of wrapper

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:

pkg_resources.DistributionNotFound: The 'pytest' distribution was not found and is required by the application

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Simon Glass <sjg@chromium.org> [on sandbox]
Signed-off-by: Tom Rini <trini@konsulko.com>
test/py/test.py