[U-Boot] [PATCH 03/10] test/py: Fix pytest4 deprecation warnings

Tom Rini trini at konsulko.com
Mon Oct 21 15:51:54 UTC 2019


On Mon, Oct 21, 2019 at 09:25:56AM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On Fri, 18 Oct 2019 at 14:53, Tom Rini <trini at konsulko.com> wrote:
> >
> > From: Marek Vasut <marek.vasut at gmail.com>
> >
> > Fix the following spit from pytest:
> >
> > u-boot/test/py/conftest.py:438: RemovedInPytest4Warning: MarkInfo objects are deprecated as they contain merged marks which are hard to deal with correctly.
> >   Please use node.get_closest_marker(name) or node.iter_markers(name).
> >   Docs: https://docs.pytest.org/en/latest/mark.html#updating-code
> >     for board in mark.args:
> >
> > In both cases, the later suggestion is applicable.
> >
> > Signed-off-by: Marek Vasut <marek.vasut+renesas at gmail.com>
> > Cc: Igor Opaniuk <igor.opaniuk at linaro.org>
> > Cc: Tom Rini <trini at konsulko.com>
> > Cc: Simon Glass <sjg at chromium.org>
> > [trini: Update for current file with a few more cases, un-pin pytest in CI]
> > Signed-off-by: Tom Rini <trini at konsulko.com>
> > ---
> >  .gitlab-ci.yml      |  2 +-
> >  .travis.yml         |  2 +-
> >  test/py/conftest.py | 30 ++++++++++++------------------
> >  3 files changed, 14 insertions(+), 20 deletions(-)
> 
> This causes a breakage on my machine even with the rest of the patches applied.
> 
> make qcheck
> ./test/run quick
> sandbox: +make O=/scratch/sglass/cosarm/src/third_party/u-boot/files/build-sandbox
> -s sandbox_defconfig
> +make O=/scratch/sglass/cosarm/src/third_party/u-boot/files/build-sandbox -s -j8
> INTERNALERROR> Traceback (most recent call last):
> INTERNALERROR>   File
> "/usr/lib/python2.7/dist-packages/_pytest/main.py", line 101, in
> wrap_session

As I've promised Heinrich as well, I will update the README.md file for
the tests.  That's invoking python2-pytest so it's not going to work.
You need to either pip3 (or virtualenv -p /usr/bin/python3) install
pytest to get the python3 version.

-- 
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/20191021/091482be/attachment.sig>


More information about the U-Boot mailing list