Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pytest to generate junit xml files for python tests #1562

Merged
merged 2 commits into from
Jul 5, 2022

Conversation

ahcorde
Copy link
Contributor

@ahcorde ahcorde commented Jun 29, 2022

Signed-off-by: ahcorde [email protected]

🦟 Bug fix

Summary

Python unit tests currently don't generate junit xml files for consumption by Jenkins. This results in Jenkins indicating that there are no failing tests when python tests are failing. couldn't find a way to generate these files using the builtin unittest python library, so I have added a dependency on pytest. If pytest is not available, a CMake warning is emitted.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@ahcorde ahcorde requested a review from chapulina as a code owner June 29, 2022 19:45
@ahcorde ahcorde self-assigned this Jun 29, 2022
@codecov
Copy link

codecov bot commented Jun 29, 2022

Codecov Report

Merging #1562 (4ef6016) into ign-gazebo6 (1f6c126) will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff              @@
##           ign-gazebo6    #1562   +/-   ##
============================================
  Coverage        64.01%   64.01%           
============================================
  Files              317      317           
  Lines            25635    25635           
============================================
  Hits             16410    16410           
  Misses            9225     9225           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f6c126...4ef6016. Read the comment docs.

@chapulina chapulina added 🏯 fortress Ignition Fortress tests Broken or missing tests / testing infra scripting Scripting interfaces to Ignition labels Jun 29, 2022
@chapulina
Copy link
Contributor

I see that testFixture_TEST.py ran on Jenkins, but I don't see it on the test result list, should it be there?

https://build.osrfoundation.org/job/ignition_gazebo-ci-pr_any-ubuntu_auto-amd64/9043/testReport/(root)/

@ahcorde
Copy link
Contributor Author

ahcorde commented Jun 30, 2022

I see that testFixture_TEST.py ran on Jenkins, but I don't see it on the test result list, should it be there?

https://build.osrfoundation.org/job/ignition_gazebo-ci-pr_any-ubuntu_auto-amd64/9043/testReport/(root)/

I can see the test here https://build.osrfoundation.org/job/ignition_gazebo-ci-pr_any-ubuntu_auto-amd64/9043/testReport/

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I see the test now on Jenkins, thanks for the link!

@chapulina chapulina merged commit 199237d into ign-gazebo6 Jul 5, 2022
@chapulina chapulina deleted the ahcorde/6/use_pytest branch July 5, 2022 17:25
liamhan0905 pushed a commit that referenced this pull request Jul 25, 2022
liamhan0905 pushed a commit that referenced this pull request Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress scripting Scripting interfaces to Ignition tests Broken or missing tests / testing infra
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants