]> git.pld-linux.org Git - packages/python3.git/commitdiff
- disable network in tests; check for semaphore (we force it with ac_cv_posix_semapho...
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 6 Feb 2021 10:51:51 +0000 (11:51 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 6 Feb 2021 10:51:51 +0000 (11:51 +0100)
python3-tests.patch
python3.spec

index 1272d4d4b1c4a2e732753f611dc1ad185c6769f3..8baa77aada721a4ec1407049f04b0ce3dd9db0cc 100644 (file)
          self.assertIn(cm.exception.errno, expected_errnos)
  
  
+--- Python-3.9.1/Lib/test/test_unicodedata.py~ 2020-12-07 15:02:38.000000000 +0100
++++ Python-3.9.1/Lib/test/test_unicodedata.py  2021-02-06 11:25:21.864427644 +0100
+@@ -11,7 +11,7 @@ from http.client import HTTPException
+ import sys
+ import unicodedata
+ import unittest
+-from test.support import open_urlresource, requires_resource, script_helper
++from test.support import open_urlresource, requires_resource, script_helper, is_resource_enabled
+ class UnicodeMethodsTest(unittest.TestCase):
+@@ -320,6 +320,8 @@ class NormalizationTest(unittest.TestCas
+         data = [int(x, 16) for x in data.split(" ")]
+         return "".join([chr(x) for x in data])
++    @unittest.skipUnless(is_resource_enabled('network'),
++                         'network is not enabled')
+     def test_normalization(self):
+         TESTDATAFILE = "NormalizationTest.txt"
+         TESTDATAURL = f"http://www.pythontest.net/unicode/{unicodedata.unidata_version}/{TESTDATAFILE}"
index 864a084947085b0f06c6d0e95535c7b550556524..4014bca24dcb1a0b9a47b72634c89c3f7b341d96 100644 (file)
@@ -11,7 +11,7 @@
 # tests which will not work on 64-bit platforms
 %define                no64bit_tests   -x test_audioop -x test_rgbimg -x test_imageop
 # tests which may fail because of builder environment limitations (no /proc or /dev/pts)
-%define                nobuilder_tests -x test_resource -x test_openpty -x test_socket -x test_nis -x test_posix -x test_locale -x test_pty -x test_asyncio -x test_os -x test_readline -x test_normalization
+%define                nobuilder_tests -u-network -x test_resource -x test_openpty -x test_socket -x test_nis -x test_posix -x test_locale -x test_pty -x test_asyncio -x test_os -x test_readline -x test_normalization
 
 # tests which fail because of some unknown/unresolved reason (this list should be %{nil})
 #   test_site: fails because our site.py is patched to include both /usr/share/... and /usr/lib...
@@ -568,6 +568,11 @@ fi
        --with-lto
 %endif
 
+if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
+      echo "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." >&2
+      exit 1
+fi
+
 %{__make} \
        TESTOPTS="%{_smp_mflags} %{test_list}" \
        2>&1 | awk '
This page took 0.125893 seconds and 4 git commands to generate.