Skip to content

Commit

Permalink
Drop duplicated <skipped/> element in result file (#242)
Browse files Browse the repository at this point in the history
The `<skipped/>` element was actually added as part of the
`skipped_message` several lines earlier.

While multiple `<skipped/>` elements doesn't violate the JUnit schema,
there is no reason to have more than one.

Signed-off-by: Scott K Logan <logans@cottsay.net>
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
  • Loading branch information
cottsay authored and j-rivero committed Apr 27, 2020
1 parent f5cb9d6 commit 9dfcda4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ament_cmake_test/ament_cmake_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def _generate_result(result_file, *, failure_message=None, skip=False, error_mes
return """<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="%s" tests="1" failures="%d" time="0" errors="%d" skipped="%d">
<testcase classname="%s" name="%s.missing_result" time="0">
%s%s%s%s
%s%s%s
</testcase>
</testsuite>\n""" % \
(
Expand All @@ -315,7 +315,6 @@ def _generate_result(result_file, *, failure_message=None, skip=False, error_mes
1 if error_message else 0,
1 if skip else 0,
pkgname, testname,
'<skipped/>' if skip else '',
failure_message, skipped_message, error_message
)

Expand Down

0 comments on commit 9dfcda4

Please sign in to comment.