All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander Kanavin" <alex.kanavin@gmail.com>
To: Tim Orling <ticotimo@gmail.com>,
	Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: OE-core <openembedded-core@lists.openembedded.org>,
	 Tim Orling <timothy.t.orling@intel.com>
Subject: Re: [OE-core] [PATCH 1/1] python3: skip tests requiring tools-sdk
Date: Mon, 21 Jun 2021 13:59:59 +0200	[thread overview]
Message-ID: <CANNYZj8diO0prd1g6ixjhXVc6NFB0otk8dr8yY-Fw2OMEjJjSA@mail.gmail.com> (raw)
In-Reply-To: <4207e03bcbbfd8b6113c04bc7c35ceb516af31f6.1624060313.git.timothy.t.orling@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3710 bytes --]

Wait. How does this work, if IMAGE_FEATURES are set from image recipes, and
not globally?

I'm afraid this may have to be reverted, as it just made it to master.

Alex

On Sat, 19 Jun 2021 at 02:00, Tim Orling <ticotimo@gmail.com> wrote:

> Conditionally skip test_ctypes.test_find unless
> IMAGE_FEATURES contains 'tools-sdk' as these test
> cases require full packagegroup-core-buildessential
>
> Fixes:
>   AssertionError: Failed ptests:
>   {'python3': ['test_find_library_with_gcc', 'test_find_library_with_ld']}
>
> Signed-off-by: Tim Orling <timothy.t.orling@intel.com>
> ---
>  ...pes.test_find-skip-without-tools-sdk.patch | 33 +++++++++++++++++++
>  meta/recipes-devtools/python/python3_3.9.5.bb |  1 +
>  2 files changed, 34 insertions(+)
>  create mode 100644
> meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch
>
> diff --git
> a/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch
> b/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch
> new file mode 100644
> index 00000000000..7d684b3c43c
> --- /dev/null
> +++
> b/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch
> @@ -0,0 +1,33 @@
> +From 7a2bddfa437be633bb6945d0e6b7d6f27da870ad Mon Sep 17 00:00:00 2001
> +From: Tim Orling <timothy.t.orling@intel.com>
> +Date: Fri, 18 Jun 2021 11:56:50 -0700
> +Subject: [PATCH] test_ctypes.test_find: skip without tools-sdk
> +
> +These tests need full packagegroup-core-buildessential, the
> +easiest way to dynamically check for that is looking for
> +'tools-sdk' in IMAGE_FEATURES.
> +
> +Upstream-Status: Inappropriate [oe-specific]
> +
> +Signed-off-by: Tim Orling <timothy.t.orlign@intel.com>
> +---
> + Lib/ctypes/test/test_find.py | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/Lib/ctypes/test/test_find.py b/Lib/ctypes/test/test_find.py
> +index 92ac184..0d009d1 100644
> +--- a/Lib/ctypes/test/test_find.py
> ++++ b/Lib/ctypes/test/test_find.py
> +@@ -112,10 +112,12 @@ class FindLibraryLinux(unittest.TestCase):
> +                 # LD_LIBRARY_PATH)
> +                 self.assertEqual(find_library(libname), 'lib%s.so' %
> libname)
> +
> ++    @unittest.skip("Needs IMAGE_FEATURE += \"tools-sdk\"")
> +     def test_find_library_with_gcc(self):
> +         with unittest.mock.patch("ctypes.util._findSoname_ldconfig",
> lambda *args: None):
> +             self.assertNotEqual(find_library('c'), None)
> +
> ++    @unittest.skip("Needs IMAGE_FEATURE += \"tools-sdk\"")
> +     def test_find_library_with_ld(self):
> +         with unittest.mock.patch("ctypes.util._findSoname_ldconfig",
> lambda *args: None), \
> +              unittest.mock.patch("ctypes.util._findLib_gcc", lambda
> *args: None):
> diff --git a/meta/recipes-devtools/python/python3_3.9.5.bb
> b/meta/recipes-devtools/python/python3_3.9.5.bb
> index f4002f2516f..1717ff737d4 100644
> --- a/meta/recipes-devtools/python/python3_3.9.5.bb
> +++ b/meta/recipes-devtools/python/python3_3.9.5.bb
> @@ -31,6 +31,7 @@ SRC_URI = "
> http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
>
> file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \
>
> file://0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch \
>
> file://0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch \
> +           ${@bb.utils.contains('IMAGE_FEATURES', 'tools-sdk', '',
> 'file://0001-test_ctypes.test_find-skip-without-tools-sdk.patch', d)} \
>             "
>
>  SRC_URI_append_class-native = " \
> --
> 2.30.2
>
>
> 
>
>

[-- Attachment #2: Type: text/html, Size: 5136 bytes --]

  reply	other threads:[~2021-06-21 12:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-19  0:00 [PATCH 0/1] python3: skip tests requiring tools-sdk Tim Orling
2021-06-19  0:00 ` [PATCH 1/1] " Tim Orling
2021-06-21 11:59   ` Alexander Kanavin [this message]
2021-06-21 17:30     ` [OE-core] " Tim Orling
2021-06-21 20:16       ` Alexander Kanavin
2021-06-21 20:24         ` Tim Orling
2021-06-21 20:50       ` Richard Purdie
2021-06-21 21:10         ` Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANNYZj8diO0prd1g6ixjhXVc6NFB0otk8dr8yY-Fw2OMEjJjSA@mail.gmail.com \
    --to=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=ticotimo@gmail.com \
    --cc=timothy.t.orling@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.