Update TAP publisher plugin

Add support for the following configuration options:

 - stripSingleParents
 - flattentTapResult
 - skipIfBuildNotOk
 - removeYamlIfCorrupted

Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Change-Id: I387e5cd46fadb54e478627346dc6b4223bda1fc0
This commit is contained in:
Kienan Stewart 2024-01-23 15:56:10 -05:00
parent 35a75d28e5
commit 804fcf903e
5 changed files with 27 additions and 0 deletions

View File

@ -4282,6 +4282,13 @@ def tap(registry, xml_parent, data):
(default true)
:arg bool show-only-failures: show only test failures (>=1.17)
(default false)
:arg bool strip-single-parents: (>=2.0) (default false)
:arg bool flatten-tap-result: flattent multiple subtest levels into a
single file (>=2.0) (default false)
:arg bool skip-if-built-not-ok: skip publishing TAP results when
build fails (>= 2.0.1) (default false)
:arg bool remove-yaml-if-corrupted: Remove corrupted YAML (>=2.3)
(default false)
Full Example:
@ -4310,6 +4317,10 @@ def tap(registry, xml_parent, data):
("plan-required", "planRequired", True),
("verbose", "verbose", True),
("show-only-failures", "showOnlyFailures", False),
("strip-single-parents", "stripSingleParents", False),
("flatten-tap-result", "flattenTapResult", False),
("skip-if-build-not-ok", "skipIfBuildNotOk", False),
("remove-yaml-if-corrupted", "removeYamlIfCorrupted", False),
]
helpers.convert_mapping_to_xml(tap, data, mappings, fail_required=True)

View File

@ -14,6 +14,10 @@
<planRequired>false</planRequired>
<verbose>false</verbose>
<showOnlyFailures>true</showOnlyFailures>
<stripSingleParents>true</stripSingleParents>
<flattenTapResult>true</flattenTapResult>
<skipIfBuildNotOk>true</skipIfBuildNotOk>
<removeYamlIfCorrupted>true</removeYamlIfCorrupted>
</org.tap4j.plugin.TapPublisher>
</publishers>
</project>

View File

@ -12,3 +12,7 @@ publishers:
plan-required: false
verbose: false
show-only-failures: true
strip-single-parents: true
flatten-tap-result: true
skip-if-build-not-ok: true
remove-yaml-if-corrupted: true

View File

@ -14,6 +14,10 @@
<planRequired>true</planRequired>
<verbose>true</verbose>
<showOnlyFailures>false</showOnlyFailures>
<stripSingleParents>false</stripSingleParents>
<flattenTapResult>false</flattenTapResult>
<skipIfBuildNotOk>false</skipIfBuildNotOk>
<removeYamlIfCorrupted>false</removeYamlIfCorrupted>
</org.tap4j.plugin.TapPublisher>
</publishers>
</project>

View File

@ -14,6 +14,10 @@
<planRequired>true</planRequired>
<verbose>true</verbose>
<showOnlyFailures>false</showOnlyFailures>
<stripSingleParents>false</stripSingleParents>
<flattenTapResult>false</flattenTapResult>
<skipIfBuildNotOk>false</skipIfBuildNotOk>
<removeYamlIfCorrupted>false</removeYamlIfCorrupted>
</org.tap4j.plugin.TapPublisher>
</publishers>
</project>