commit 81d56a2b5c9e051ebf1eaa10bd4905726906678c
Author: Arkadiusz Miƛkiewicz <[email protected]>
Date:   Sat Feb 6 11:51:51 2021 +0100

    - disable network in tests; check for semaphore (we force it with 
ac_cv_posix_semaphores_enabled=yes but that should go away eventually)

 python3-tests.patch | 20 ++++++++++++++++++++
 python3.spec        |  7 ++++++-
 2 files changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/python3.spec b/python3.spec
index 864a084..4014bca 100644
--- a/python3.spec
+++ b/python3.spec
@@ -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 '
diff --git a/python3-tests.patch b/python3-tests.patch
index 1272d4d..8baa77a 100644
--- a/python3-tests.patch
+++ b/python3-tests.patch
@@ -18,3 +18,23 @@
          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}";
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3.git/commitdiff/81d56a2b5c9e051ebf1eaa10bd4905726906678c

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to