diff options
| author | Tim Orling <timothy.t.orling@intel.com> | 2021-06-18 12:05:47 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-07-10 22:46:19 +0100 |
| commit | 857a540838b74b2a0ee868b9e801dc104c9a540a (patch) | |
| tree | 825919c3a3959a2e62fd0b2231511b93d40afab4 /meta/recipes-devtools/python/python3 | |
| parent | dc29017614cb6bc2bddd89c31ec8ca58294e1ba1 (diff) | |
| download | poky-857a540838b74b2a0ee868b9e801dc104c9a540a.tar.gz | |
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: 63bc36dbd93c46be8adf7db00e3fc22897eb1846)
Signed-off-by: Tim Orling <timothy.t.orling@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3')
| -rw-r--r-- | meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch | 33 |
1 files changed, 33 insertions, 0 deletions
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 @@ | |||
| 1 | From 7a2bddfa437be633bb6945d0e6b7d6f27da870ad Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Tim Orling <timothy.t.orling@intel.com> | ||
| 3 | Date: Fri, 18 Jun 2021 11:56:50 -0700 | ||
| 4 | Subject: [PATCH] test_ctypes.test_find: skip without tools-sdk | ||
| 5 | |||
| 6 | These tests need full packagegroup-core-buildessential, the | ||
| 7 | easiest way to dynamically check for that is looking for | ||
| 8 | 'tools-sdk' in IMAGE_FEATURES. | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate [oe-specific] | ||
| 11 | |||
| 12 | Signed-off-by: Tim Orling <timothy.t.orling@intel.com> | ||
| 13 | --- | ||
| 14 | Lib/ctypes/test/test_find.py | 2 ++ | ||
| 15 | 1 file changed, 2 insertions(+) | ||
| 16 | |||
| 17 | diff --git a/Lib/ctypes/test/test_find.py b/Lib/ctypes/test/test_find.py | ||
| 18 | index 92ac184..0d009d1 100644 | ||
| 19 | --- a/Lib/ctypes/test/test_find.py | ||
| 20 | +++ b/Lib/ctypes/test/test_find.py | ||
| 21 | @@ -112,10 +112,12 @@ class FindLibraryLinux(unittest.TestCase): | ||
| 22 | # LD_LIBRARY_PATH) | ||
| 23 | self.assertEqual(find_library(libname), 'lib%s.so' % libname) | ||
| 24 | |||
| 25 | + @unittest.skip("Needs IMAGE_FEATURES += \"tools-sdk\"") | ||
| 26 | def test_find_library_with_gcc(self): | ||
| 27 | with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None): | ||
| 28 | self.assertNotEqual(find_library('c'), None) | ||
| 29 | |||
| 30 | + @unittest.skip("Needs IMAGE_FEATURES += \"tools-sdk\"") | ||
| 31 | def test_find_library_with_ld(self): | ||
| 32 | with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None), \ | ||
| 33 | unittest.mock.patch("ctypes.util._findLib_gcc", lambda *args: None): | ||
