Bug 1685557 - python3.spec skips test_distutils and test_bdist_rpm
Summary: python3.spec skips test_distutils and test_bdist_rpm
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python3
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Victor Stinner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-05 13:42 UTC by Victor Stinner
Modified: 2019-07-02 12:56 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-07-02 12:56:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Victor Stinner 2019-03-05 13:42:26 UTC
python3.spec skips test_distutils and test_bdist_rpm.

The whole test files shouldn't be skipped, but only failing test methods should be fixed.

Obviously, the best would be to fix the tests upstream.

Comment 1 Miro Hrončok 2019-03-05 13:46:53 UTC
I was once told that running rpmbuild from withing rpmbuild is dangerous. I've never actually seen it blow up, so consider this just a note.

Comment 2 Victor Stinner 2019-03-05 14:25:30 UTC
> I was once told that running rpmbuild from withing rpmbuild is dangerous.

If it's the case, we can skip the test if WITHIN_PYTHON_RPM_BUILD env var is set using our @unittest._skipInRpmBuild(reason) decorator.

But I would prefer to put this decorator upstream rather than maintaining such code downstream.

Comment 3 Miro Hrončok 2019-03-05 14:36:37 UTC
Let's focus on moving this decorator upstream and changing it to check RPM_BUILD_ROOT instead. The custom variable is just weird.

Comment 4 Victor Stinner 2019-03-05 14:42:51 UTC
About WITHIN_PYTHON_RPM_BUILD, I proposed a change to no longer skip RecvmsgGenericStreamTests.testRecvmsgEOF() of test_socket:
https://src.fedoraproject.org/rpms/python3/pull-request/94

Comment 5 Victor Stinner 2019-03-05 14:55:45 UTC
And I wrote the following PR to "Reenable test_posix.test_fs_holes()":
https://src.fedoraproject.org/rpms/python3/pull-request/95

Comment 6 Victor Stinner 2019-04-16 13:41:29 UTC
Scratch build with the 2 tests reenabled:
https://koji.fedoraproject.org/koji/taskinfo?taskID=34213261

Comment 7 Victor Stinner 2019-06-11 14:59:51 UTC
Sine the scratchbuild was successful, I proposed a PR to simply reenable the two tests:
https://src.fedoraproject.org/rpms/python38/pull-request/24

Comment 8 Miro Hrončok 2019-06-26 12:10:12 UTC
Fixed in python38 master. https://src.fedoraproject.org/rpms/python38/pull-request/25


Note You need to log in before you can comment on or make changes to this bug.