Page MenuHomeSoftware Heritage

conftest: Replace multiprocessing hack when pytest-cov >= 4 is installed
ClosedPublic

Authored by vlorentz on Sep 29 2022, 10:15 AM.

Details

Summary

The hack crashes on >= 4 because 'pytest_cov.embed.multiprocessing_start'
is not in the hook list anymore.

https://pytest-cov.readthedocs.io/en/latest/changelog.html

Diff Detail

Repository
rDSTO Storage manager
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 31904
Build 49935: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 49934: arc lint + arc unit

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Sep 29 2022, 10:16 AM
Harbormaster failed remote builds in B31904: Diff 30932!

Build has FAILED

Patch application report for D8576 (id=30932)

Rebasing onto 87d3f0d7b4...

Current branch diff-target is up to date.
Changes applied before test
commit a04fea9e5d612ec24cb1099d35e0db4b5a94e50d
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 29 10:15:36 2022 +0200

    conftest: Replace multiprocessing hack when pytest-cov >= 4 is installed
    
    The hack crashes on >= 4 because 'pytest_cov.embed.multiprocessing_start'
    does not exist anymore.
    
    https://pytest-cov.readthedocs.io/en/latest/changelog.html

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1669/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1669/console

Build has FAILED

Patch application report for D8576 (id=30933)

Rebasing onto 87d3f0d7b4...

Current branch diff-target is up to date.
Changes applied before test
commit c3598dd4351cc9de4647278b2304d9c0f624be19
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 29 10:15:36 2022 +0200

    conftest: Replace multiprocessing hack when pytest-cov >= 4 is installed
    
    The hack crashes on >= 4 because 'pytest_cov.embed.multiprocessing_start'
    is not in the hook list anymore.
    
    https://pytest-cov.readthedocs.io/en/latest/changelog.html

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1670/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1670/console

Build has FAILED

Patch application report for D8576 (id=30936)

Rebasing onto 87d3f0d7b4...

Current branch diff-target is up to date.
Changes applied before test
commit 89c5b72853581570e985bff52fedd43091751790
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 29 10:15:36 2022 +0200

    conftest: Replace multiprocessing hack when pytest-cov >= 4 is installed
    
    The hack crashes on >= 4 because 'pytest_cov.embed.multiprocessing_start'
    is not in the hook list anymore.
    
    https://pytest-cov.readthedocs.io/en/latest/changelog.html

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1672/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1672/console

anlambert added inline comments.
swh/storage/tests/conftest.py
40–42

distutils.version is deprecated, you could directly use pytest_cov.__version__ < "4.0.0" instead.

Build was aborted

Patch application report for D8576 (id=30939)

Rebasing onto 87d3f0d7b4...

Current branch diff-target is up to date.
Changes applied before test
commit ebc70eaa6c8291ada5f07505e4a0f91366444a27
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 29 10:15:36 2022 +0200

    conftest: Replace multiprocessing hack when pytest-cov >= 4 is installed
    
    The hack crashes on >= 4 because 'pytest_cov.embed.multiprocessing_start'
    is not in the hook list anymore.
    
    https://pytest-cov.readthedocs.io/en/latest/changelog.html

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1673/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1673/console

Build is green

Patch application report for D8576 (id=30945)

Rebasing onto 87d3f0d7b4...

Current branch diff-target is up to date.
Changes applied before test
commit 44616afe5109f495604b01cf72b412fbec8e94c0
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 29 10:15:36 2022 +0200

    conftest: Replace multiprocessing hack when pytest-cov >= 4 is installed
    
    The hack crashes on >= 4 because 'pytest_cov.embed.multiprocessing_start'
    is not in the hook list anymore.
    
    https://pytest-cov.readthedocs.io/en/latest/changelog.html

See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1674/ for more details.

This revision is now accepted and ready to land.Sep 29 2022, 4:44 PM