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

Generate xunit files valid for the junit10.xsd #220

Merged
merged 1 commit into from
Mar 11, 2020
Merged

Conversation

j-rivero
Copy link
Contributor

With the new xunit plugin version 2.x the xunit files generated should be compliant with the junit10.xsd.

The current code in different packages writing xunit files lacks the required attribute errors and use skipped instead of skip. For the skip attribute the change is trivial. For the errors attribute the description is:

The total number of tests in the suite that errored. An errored test is one that had an unanticipated problem. e.g., an unchecked throwable; or a problem with the implementation of the test

The code of linters in this repository exit the test to the system if it founds some problems with the manipulation of the different tools (like the lack of cppcheck in ament_cppcheck) so I'm assuming here that if the test is not aborted before the number of these errors is 0.

Locally the files can be validated using (download the xsd from the link above):
xmllint --schema junit-10.xsd path/to/ppcheck.xunit.xml --noout

Waiting the buildfarm test for this job: Build Status

Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
@dirk-thomas
Copy link
Contributor

I'm assuming here that if the test is not aborted before the number of these errors is 0.

Should this be updated then to signal an errors="1" instead of failures="1" then? https://github.com/ament/ament_cmake/blob/37ed0dcde921f4f0dd29e0e6cf64c55f85e193f0/ament_cmake_test/ament_cmake_test/__init__.py#L307

@j-rivero
Copy link
Contributor Author

I'm assuming here that if the test is not aborted before the number of these errors is 0.

Should this be updated then to signal an errors="1" instead of failures="1" then? https://github.com/ament/ament_cmake/blob/37ed0dcde921f4f0dd29e0e6cf64c55f85e193f0/ament_cmake_test/ament_cmake_test/__init__.py#L307

In the case of detecting segfaults or other problems not related to bad results of the test I think so. Let's follow this here: ament/ament_cmake#225

@j-rivero j-rivero merged commit c7de932 into master Mar 11, 2020
@delete-merged-branch delete-merged-branch bot deleted the junit10_xsd branch March 11, 2020 18:07
nuclearsandwich pushed a commit that referenced this pull request Mar 20, 2020
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
nuclearsandwich pushed a commit that referenced this pull request Mar 20, 2020
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
nuclearsandwich added a commit that referenced this pull request Mar 26, 2020
* Generate xunit files valid for the junit10.xsd (#220)

Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>

* remove status attribute from result XML (#212)

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>

Co-authored-by: Jose Luis Rivero <jrivero@osrfoundation.org>
Co-authored-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
nuclearsandwich added a commit that referenced this pull request Apr 11, 2020
* Generate xunit files valid for the junit10.xsd (#220)

Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>

* remove status attribute from result XML (#212)

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>

Co-authored-by: Jose Luis Rivero <jrivero@osrfoundation.org>
Co-authored-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
kenji-miyake pushed a commit to kenji-miyake/ament_lint that referenced this pull request Oct 20, 2021
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
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.

None yet

2 participants