mirror of
https://git.yoctoproject.org/poky
synced 2026-02-05 08:18:43 +01:00
python3: skip tests requiring tools-sdk
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']}
(From OE-Core rev: 70e2fc066a18c35e42610d75eeaa1edd9aab7cf2)
(From OE-Core rev: c6567235cba55f50ca77d5db848c887232f3670c)
Signed-off-by: Tim Orling <timothy.t.orling@intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
6636260620
commit
721555184b
@@ -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):
|
||||
Reference in New Issue
Block a user