Skip to content

Always set junit_family to xunit2 for dashing, eloquent, and foxy#503

Merged
jacobperron merged 5 commits intomasterfrom
jacob/junit_family_pytest_arg
Aug 18, 2020
Merged

Always set junit_family to xunit2 for dashing, eloquent, and foxy#503
jacobperron merged 5 commits intomasterfrom
jacob/junit_family_pytest_arg

Conversation

@jacobperron
Copy link
Copy Markdown
Member

The pytest arg has precedence over a value set in an existing pytest.ini file.

To use the --pytest-args option, we have to be careful not to hide (or be hidden by) existing instances of the option. If --pytest-args already exists, then insert the additional options.

Alternative to #501 and #502

Foxy builds were failing.
Before: Build Status
After: Build Status

Copy link
Copy Markdown
Member

@cottsay cottsay left a comment

Choose a reason for hiding this comment

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

I don't have a ton of context here, but this change seems like a good approach to me.

@jacobperron
Copy link
Copy Markdown
Member Author

Foxy:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Rolling:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Dashing:

  • Linux Build Status

@j-rivero
Copy link
Copy Markdown

j-rivero commented Aug 8, 2020

The approach looks good to me, but somehow it is not being propagated to the invocation of pytest in some packages:

Foxy:

* Linux

This one is failing after run:

11: Test command: /home/jenkins-agent/workspace/ci_linux/venv/bin/python3 "-u" "/home/jenkins-agent/workspace/ci_linux/ws/install/ament_cmake_test/share/ament_cmake_test/cmake/run_test.py" "/home/jenkins-agent/workspace/ci_linux/ws/build/message_filters/test_results/message_filters/directed.py.xunit.xml" "--package-name" "message_filters" "--output-file" "/home/jenkins-agent/workspace/ci_linux/ws/build/message_filters/ament_cmake_pytest/directed.py.txt" "--command" "/home/jenkins-agent/workspace/ci_linux/venv/bin/python3" "-u" "-m" "pytest" "/home/jenkins-agent/workspace/ci_linux/ws/src/ros2/message_filters/test/directed.py" "-o" "cache_dir=/home/jenkins-agent/workspace/ci_linux/ws/build/message_filters/ament_cmake_pytest/directed.py/.cache" "--junit-xml=/home/jenkins-agent/workspace/ci_linux/ws/build/message_filters/test_results/message_filters/directed.py.xunit.xml" "--junit-prefix=message_filters"

@jacobperron
Copy link
Copy Markdown
Member Author

The approach looks good to me, but somehow it is not being propagated to the invocation of pytest in some packages

Yeah, we're still seeing warnings for some subset of the packages. I bet that it is because these packages are CMake packages, adding pytests like this, for example:

https://github.com/ros2/message_filters/blob/985fac0e594c00ccc35cd4a4522fa431f2e51e2e/CMakeLists.txt#L130-L137

I think we either have to pass the appropriate args either via CMake or backport the pytest.ini changes to the Foxy branch.

The pytest arg has precedence over a value set in an existing pytest.ini file.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron jacobperron force-pushed the jacob/junit_family_pytest_arg branch from c69f15a to 95faefe Compare August 17, 2020 21:41
@jacobperron
Copy link
Copy Markdown
Member Author

I think I've backported all of the necessary pytest.ini files for this PR to work. The backports just need to be approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants