Page MenuHomeSoftware Heritage

tests: Fix execution when building debian packages
ClosedPublic

Authored by anlambert on Oct 19 2021, 6:11 PM.

Details

Summary

Recent changes in swh-web tests broke the debian package builds.

When building debian packages, the pytest command is not available in build
environment and must be executed through "python3 -m pytest" instead.

Debian buster packages a quite old version of pytest (3.10.1) and some
pytest hooks parameters and CLI options are missing compared to upstream
version so workaround these issues.

Also silent non critical warnings related to the use of hypothesis and
pytest function scoped fixtures as they add a lot of noise in pytest
reports.

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont accepted this revision.
This revision is now accepted and ready to land.Oct 19 2021, 6:13 PM

Build has FAILED

Patch application report for D6511 (id=23643)

Rebasing onto 96b3d287ed...

Current branch diff-target is up to date.
Changes applied before test
commit 2603e9cefe4a105fc8c04d26d38231bdb1b16699
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 19 17:49:57 2021 +0200

    tests: Fix execution when building debian packages
    
    Recent changes in swh-web tests broke the debian package builds.
    
    When building debian packages, the pytest command is not available in build
    environment and must be executed through "python3 -m pytest" instead.
    
    Debian buster packages a quite old version of pytest (3.10.1) and some
    pytest hooks parameters and CLI options are missing compared to upstream
    version so workaround these issues.
    
    Also silent non critical warnings related to the use of hypothesis and
    pytest function scoped fixtures as they add a lot of noise in pytest
    reports.

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

Build is green

Patch application report for D6511 (id=23643)

Rebasing onto 96b3d287ed...

Current branch diff-target is up to date.
Changes applied before test
commit 2603e9cefe4a105fc8c04d26d38231bdb1b16699
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 19 17:49:57 2021 +0200

    tests: Fix execution when building debian packages
    
    Recent changes in swh-web tests broke the debian package builds.
    
    When building debian packages, the pytest command is not available in build
    environment and must be executed through "python3 -m pytest" instead.
    
    Debian buster packages a quite old version of pytest (3.10.1) and some
    pytest hooks parameters and CLI options are missing compared to upstream
    version so workaround these issues.
    
    Also silent non critical warnings related to the use of hypothesis and
    pytest function scoped fixtures as they add a lot of noise in pytest
    reports.

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