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

[20411] Generate jUnit reports when CMake < 3.21 #56

Merged
merged 12 commits into from
Feb 13, 2024

Conversation

EduPonz
Copy link

@EduPonz EduPonz commented Feb 12, 2024

Description

The colcon_test action passes the --output-junit flag to CTest so it generates jUnit reports that can be later used in the Test-Reporter action. However, that flag was added in CMake 3.21, so when using older CMake versions, CTest simply ignores the flag but it does not create the jUnit reports.

This PR adds a script to translate CTest native reports (generated with the -D Experimental CTest dashboard mode) to jUnit for further use. Note that the call to colcon test is passing the -D Experimental flag to CTest automatically, so other actions using CTest either directly or through other tool would need to ensure that the appropriate options are passed to CTest before using the translation script.

Contributor Checklist

  • Commit messages follow the company guidelines.
  • Changes are API compatible.
  • New features have been added to the versions.md and README.md files (if applicable).

Reviewer Checklist

  • The title and description correctly express the PR's purpose.
  • The Contributor checklist is correctly filled.

@EduPonz EduPonz force-pushed the feature/ctest2junit_translation branch 12 times, most recently from 6a24a1f to bac2f80 Compare February 13, 2024 10:08
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
…port flag --output-junit

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

Refs #20441: Adjust paths in ubuntu

Signed-off-by: EduPonz <eduardoponz@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
@EduPonz EduPonz force-pushed the feature/ctest2junit_translation branch 2 times, most recently from 574486e to 16404a7 Compare February 13, 2024 10:17
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
@EduPonz EduPonz force-pushed the feature/ctest2junit_translation branch from 67915c3 to 5ee0f49 Compare February 13, 2024 10:50
@EduPonz EduPonz changed the title [20411] Update colcon_test action to generate jUnit reports when CMake < 3.21 [20411] Generate jUnit reports when CMake < 3.21 Feb 13, 2024
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
@EduPonz EduPonz force-pushed the feature/ctest2junit_translation branch 7 times, most recently from 70485ed to 7579c03 Compare February 13, 2024 12:51
@EduPonz EduPonz force-pushed the feature/ctest2junit_translation branch 12 times, most recently from 58db9ec to b845942 Compare February 13, 2024 14:00
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>

Refs #20411: Correctly propagate args to python

Signed-off-by: EduPonz <eduardoponz@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
@EduPonz EduPonz force-pushed the feature/ctest2junit_translation branch from b845942 to 5113508 Compare February 13, 2024 14:21
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
resources/ctest2junit.py Outdated Show resolved Hide resolved
resources/ctest2junit.py Outdated Show resolved Hide resolved
resources/ctest2junit.py Outdated Show resolved Hide resolved
resources/junit_summary.py Show resolved Hide resolved
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
@EduPonz EduPonz merged commit 1b254dc into main Feb 13, 2024
1 check passed
@EduPonz EduPonz deleted the feature/ctest2junit_translation branch February 13, 2024 15:10
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.

2 participants