All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Steve Sakoman" <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][dunfell 01/19] python3: skip tests requiring tools-sdk
Date: Mon,  5 Jul 2021 12:34:38 -1000	[thread overview]
Message-ID: <63bc36dbd93c46be8adf7db00e3fc22897eb1846.1625511812.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1625511812.git.steve@sakoman.com>

From: Tim Orling <timothy.t.orling@intel.com>

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>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 ...pes.test_find-skip-without-tools-sdk.patch | 33 +++++++++++++++++++
 .../recipes-devtools/python/python3_3.8.10.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 0000000000..a44d3396a6
--- /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.orling@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_FEATURES += \"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_FEATURES += \"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.8.10.bb b/meta/recipes-devtools/python/python3_3.8.10.bb
index ae32ccc40e..c3da6718a8 100644
--- a/meta/recipes-devtools/python/python3_3.8.10.bb
+++ b/meta/recipes-devtools/python/python3_3.8.10.bb
@@ -33,6 +33,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
            file://0001-configure.ac-fix-LIBPL.patch \
            file://0001-python3-Do-not-hardcode-lib-for-distutils.patch \
            file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.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.25.1


  reply	other threads:[~2021-07-05 22:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05 22:34 [OE-core][dunfell 00/19] Patch review Steve Sakoman
2021-07-05 22:34 ` Steve Sakoman [this message]
2021-07-05 22:34 ` [OE-core][dunfell 02/19] python3: apply test skipping patch unconditionally Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 03/19] rpm: fix CVE-2021-3421 Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 04/19] gstreamer-plugins-base: fix CVE-2021-3522 Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 05/19] linux-yocto/5.4: update to v5.4.124 Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 06/19] linux-yocto/5.4: update to v5.4.125 Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 07/19] linux-yocto/5.4: update to v5.4.128 Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 08/19] linux-yocto/5.4: update to v5.4.129 Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 09/19] kernel: Fix interaction when packaging disabled Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 10/19] kernel-devicetree: " Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 11/19] selftest: do not hardcode /tmp/sdk Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 12/19] perf: Use python3targetconfig to ensure we use target libraries Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 13/19] pypi: set SRC_URI with _prepend, not with += Steve Sakoman
2021-07-06  8:30   ` Martin Jansa
2021-07-06  8:41     ` Khem Raj
2021-07-06 14:16     ` Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 14/19] package_pkgdata: Avoid task hash mismatches for generic task changes Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 15/19] sstate.bbclass: fix errors about read-only sstate mirrors Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 16/19] oeqa/selftest/runcmd: Tweal test timeouts Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 17/19] sstate/staging: Handle directory creation race issue Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 18/19] devtool: deploy-target: Fix preserving attributes when using --strip Steve Sakoman
2021-07-05 22:34 ` [OE-core][dunfell 19/19] oeqa/selftest/archiver: Allow tests to ignore empty directories Steve Sakoman

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=63bc36dbd93c46be8adf7db00e3fc22897eb1846.1625511812.git.steve@sakoman.com \
    --to=steve@sakoman.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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.