Merge "xUnit publisher: add test-time-margin extra config option"

This commit is contained in:
Jenkins 2015-02-19 00:22:34 +00:00 committed by Gerrit Code Review
commit 5968b57723
4 changed files with 15 additions and 0 deletions

View File

@ -853,6 +853,10 @@ def xunit(parser, xml_parent, data):
'unstable', 'unstablenew', 'failure', 'failurenew'. Omitting a \
value will resort on xUnit default value (should be 0).
:arg int test-time-margin: Give the report time margin value (default to \
3000) in ms, before to fail if not new (unless the option 'Fail the build \
if test results were not updated this run' is checked).
:arg dict types: per framework configuration. The key should be \
one of the internal types we support:\
'aunit', 'boosttest', 'checktype', 'cpptest', 'cppunit', 'ctest', \
@ -963,6 +967,10 @@ def xunit(parser, xml_parent, data):
XML.SubElement(xunit, 'thresholdMode').text = \
thresholdmode
extra_config = XML.SubElement(xunit, 'extraConfiguration')
XML.SubElement(extra_config, 'testTimeMargin').text = \
str(data.get('test-time-margin', '3000'))
def _violations_add_entry(xml_parent, name, data):
vmin = data.get('min', 10)

View File

@ -31,6 +31,9 @@
</org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
</thresholds>
<thresholdMode>2</thresholdMode>
<extraConfiguration>
<testTimeMargin>3000</testTimeMargin>
</extraConfiguration>
</xunit>
</publishers>
</project>

View File

@ -25,6 +25,9 @@
</org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
</thresholds>
<thresholdMode>1</thresholdMode>
<extraConfiguration>
<testTimeMargin>5000</testTimeMargin>
</extraConfiguration>
</xunit>
</publishers>
</project>

View File

@ -1,5 +1,6 @@
publishers:
- xunit:
test-time-margin: 5000
thresholdmode: 'number'
thresholds:
- failed: