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

Inherit markers from generate_test_description #330

Merged
merged 1 commit into from
Nov 16, 2022

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Nov 4, 2022

As it stands, pytest sees rostest tests as a single testing node with no markings. It would be useful if normal pytest markings could be used on the generate_test_description function (where @pytest.mark.rostest and @launch_testing.parametrize are currently specified).

Notably, this will always mark the test nodes with 'rostest', and will allow the use of very useful marking like 'xfail', 'skip', and 'skipif'.

To duplicate the markers from the entrypoint, this change makes use of the MarkerGenerator singleton (aka pytest.mark) to create a new MarkerDecorator with the same name, then copies the original marker's arguments, which are critical for markers like skipif.

Complements ros2/launch#670

As it stands, pytest sees rostest tests as a single testing node with no
markings. It would be useful if normal pytest markings could be used on
the generate_test_description function (where @pytest.mark.rostest and
@launch_testing.parametrize are currently specified).

Notably, this will always mark the test nodes with 'rostest', and will
allow the use of very useful marking like 'xfail', 'skip', and 'skipif'.

Signed-off-by: Scott K Logan <logans@cottsay.net>
@cottsay cottsay self-assigned this Nov 4, 2022
@cottsay cottsay added the enhancement New feature or request label Nov 4, 2022
@cottsay
Copy link
Member Author

cottsay commented Nov 4, 2022

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@methylDragon
Copy link
Contributor

methylDragon commented Nov 15, 2022

Rebuilding rhel: * Linux-rhel Build Status

The instability is on the nightlies too: https://ci.ros2.org/view/nightly/job/nightly_linux-rhel_release/1323/testReport/

@methylDragon methylDragon merged commit f142fd3 into rolling Nov 16, 2022
@methylDragon methylDragon deleted the cottsay/markers branch November 16, 2022 19:03
@cottsay
Copy link
Member Author

cottsay commented Nov 17, 2022

@Mergifyio backport humble

@cottsay
Copy link
Member Author

cottsay commented Nov 17, 2022

@Mergifyio backport galactic

@mergify
Copy link

mergify bot commented Nov 17, 2022

backport humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Nov 17, 2022
mergify bot pushed a commit that referenced this pull request Nov 17, 2022
(cherry picked from commit f142fd3)

# Conflicts:
#	launch_testing_ros/launch_testing_ros_pytest_entrypoint.py
@mergify
Copy link

mergify bot commented Nov 17, 2022

backport galactic

✅ Backports have been created

cottsay added a commit that referenced this pull request Nov 23, 2022
(cherry picked from commit f142fd3)

Co-authored-by: Scott K Logan <logans@cottsay.net>
Signed-off-by: Scott K Logan <logans@cottsay.net>
cottsay added a commit that referenced this pull request Nov 23, 2022
(cherry picked from commit f142fd3)

Co-authored-by: Scott K Logan <logans@cottsay.net>
Signed-off-by: Scott K Logan <logans@cottsay.net>
cottsay added a commit that referenced this pull request Nov 24, 2022
(cherry picked from commit f142fd3)

Co-authored-by: Scott K Logan <logans@cottsay.net>
Signed-off-by: Scott K Logan <logans@cottsay.net>
cottsay added a commit that referenced this pull request Nov 27, 2022
(cherry picked from commit f142fd3)

Co-authored-by: Scott K Logan <logans@cottsay.net>
Signed-off-by: Scott K Logan <logans@cottsay.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants