diff --git a/00132-add-rpmbuild-hooks-to-unittest.patch b/00132-add-rpmbuild-hooks-to-unittest.patch deleted file mode 100644 index 77dc6ec..0000000 --- a/00132-add-rpmbuild-hooks-to-unittest.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -up Python-3.2.2/Lib/unittest/case.py.add-rpmbuild-hooks-to-unittest Python-3.2.2/Lib/unittest/case.py ---- Python-3.2.2/Lib/unittest/case.py.add-rpmbuild-hooks-to-unittest 2011-09-03 12:16:44.000000000 -0400 -+++ Python-3.2.2/Lib/unittest/case.py 2011-09-09 06:35:16.365568382 -0400 -@@ -3,6 +3,7 @@ - import sys - import functools - import difflib -+import os - import logging - import pprint - import re -@@ -101,5 +102,21 @@ def expectedFailure(func): - raise self.test_case.failureException(msg) - -+# Non-standard/downstream-only hooks for handling issues with specific test -+# cases: -+ -+def _skipInRpmBuild(reason): -+ """ -+ Non-standard/downstream-only decorator for marking a specific unit test -+ to be skipped when run within the %check of an rpmbuild. -+ -+ Specifically, this takes effect when WITHIN_PYTHON_RPM_BUILD is set within -+ the environment, and has no effect otherwise. -+ """ -+ if 'WITHIN_PYTHON_RPM_BUILD' in os.environ: -+ return skip(reason) -+ else: -+ return _id -+ - class _AssertRaisesBaseContext(_BaseTestCaseContext): - - def __init__(self, expected, test_case, expected_regex=None): -diff -up Python-3.2.2/Lib/unittest/__init__.py.add-rpmbuild-hooks-to-unittest Python-3.2.2/Lib/unittest/__init__.py ---- Python-3.2.2/Lib/unittest/__init__.py.add-rpmbuild-hooks-to-unittest 2011-09-03 12:16:44.000000000 -0400 -+++ Python-3.2.2/Lib/unittest/__init__.py 2011-09-09 06:35:16.366568382 -0400 -@@ -57,7 +57,8 @@ __unittest = True - - from .result import TestResult - from .case import (TestCase, FunctionTestCase, SkipTest, skip, skipIf, -- skipUnless, expectedFailure) -+ skipUnless, expectedFailure, -+ _skipInRpmBuild) - from .suite import BaseTestSuite, TestSuite - from .loader import (TestLoader, defaultTestLoader, makeSuite, getTestCaseNames, - findTestCases) diff --git a/00160-disable-test_fs_holes-in-rpm-build.patch b/00160-disable-test_fs_holes-in-rpm-build.patch deleted file mode 100644 index 9fa91d5..0000000 --- a/00160-disable-test_fs_holes-in-rpm-build.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up cpython-59223da36dec/Lib/test/test_posix.py.disable-test_fs_holes-in-rpm-build cpython-59223da36dec/Lib/test/test_posix.py ---- cpython-59223da36dec/Lib/test/test_posix.py.disable-test_fs_holes-in-rpm-build 2012-08-07 17:15:59.000000000 -0400 -+++ cpython-59223da36dec/Lib/test/test_posix.py 2012-08-07 17:16:53.528330330 -0400 -@@ -973,6 +973,7 @@ class PosixTester(unittest.TestCase): - posix.RTLD_GLOBAL - posix.RTLD_LOCAL - -+ @unittest._skipInRpmBuild('running kernel may not match kernel in chroot') - @unittest.skipUnless(hasattr(os, 'SEEK_HOLE'), - "test needs an OS that reports file holes") - def test_fs_holes(self): diff --git a/python3.spec b/python3.spec index b05f15d..d7e4d7d 100644 --- a/python3.spec +++ b/python3.spec @@ -232,20 +232,6 @@ Patch102: 00102-lib64.patch # Downstream only: not appropriate for upstream Patch111: 00111-no-static-lib.patch -# 00132 # -# Add non-standard hooks to unittest for use in the "check" phase below, when -# running selftests within the build: -# @unittest._skipInRpmBuild(reason) -# for tests that hang or fail intermittently within the build environment, and: -# @unittest._expectedFailureInRpmBuild -# for tests that always fail within the build environment -# -# The hooks only take effect if WITHIN_PYTHON_RPM_BUILD is set in the -# environment, which we set manually in the appropriate portion of the "check" -# phase below (and which potentially other python-* rpms could set, to reuse -# these unittest hooks in their own "check" phases) -Patch132: 00132-add-rpmbuild-hooks-to-unittest.patch - # 00155 # # Avoid allocating thunks in ctypes unless absolutely necessary, to avoid # generating SELinux denials on "import ctypes" and "import uuid" when @@ -253,13 +239,6 @@ Patch132: 00132-add-rpmbuild-hooks-to-unittest.patch # See https://bugzilla.redhat.com/show_bug.cgi?id=814391 Patch155: 00155-avoid-ctypes-thunks.patch -# 00160 # -# Python 3.3 added os.SEEK_DATA and os.SEEK_HOLE, which may be present in the -# header files in the build chroot, but may not be supported in the running -# kernel, hence we disable this test in an rpm build. -# Adding these was upstream issue http://bugs.python.org/issue10142 -# Not yet sent upstream -Patch160: 00160-disable-test_fs_holes-in-rpm-build.patch # 00170 # # In debug builds, try to print repr() when a C-level assert fails in the @@ -583,9 +562,7 @@ rm -r Modules/expat %patch102 -p1 %endif %patch111 -p1 -%patch132 -p1 %patch155 -p1 -%patch160 -p1 %patch170 -p1 %patch178 -p1 @@ -1000,17 +977,13 @@ CheckPython() { # Show some info, helpful for debugging test failures LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.pythoninfo - # Run the upstream test suite, setting "WITHIN_PYTHON_RPM_BUILD" so that the - # our non-standard decorators take effect on the relevant tests: - # @unittest._skipInRpmBuild(reason) - # @unittest._expectedFailureInRpmBuild + # Run the upstream test suite # test_gdb skipped on armv7hl: # https://bugzilla.redhat.com/show_bug.cgi?id=1196181 # test_gdb skipped on s390x: # https://bugzilla.redhat.com/show_bug.cgi?id=1678277 # test_asyncio skipped: # https://bugs.python.org/issue35998 - WITHIN_PYTHON_RPM_BUILD= \ LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \ -wW --slowest -j0 \ -x test_distutils \