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>
  • Loading branch information
cottsay committed Apr 17, 2020
1 parent 4e247cd commit 40d2021
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,15 +306,14 @@ def _generate_result(result_file, *, failure_message=None, skip=False):
return """<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="%s" tests="1" failures="%d" time="0" errors="0" skipped="%d">
<testcase classname="%s" name="%s.missing_result" time="0">
%s%s%s
%s%s
</testcase>
</testsuite>\n""" % \
(
pkgname,
1 if failure_message else 0,
1 if skip else 0,
pkgname, testname,
'<skipped/>' if skip else '',
failure_message, skipped_message
)

Expand Down

0 comments on commit 40d2021

Please sign in to comment.