Merge "publishers: xunit doesn't accepts integers as threshold"
This commit is contained in:
commit
e5ee0ce002
@ -1103,7 +1103,7 @@ def xunit(parser, xml_parent, data):
|
||||
# Normalize and craft the element name for this threshold
|
||||
elname = "%sThreshold" % threshold_name.lower().replace(
|
||||
'new', 'New')
|
||||
XML.SubElement(el, elname).text = threshold_value
|
||||
XML.SubElement(el, elname).text = str(threshold_value)
|
||||
|
||||
# Whether to use percent of exact number of tests.
|
||||
# Thresholdmode is either:
|
||||
|
@ -27,16 +27,16 @@
|
||||
</types>
|
||||
<thresholds>
|
||||
<org.jenkinsci.plugins.xunit.threshold.FailedThreshold>
|
||||
<unstableThreshold/>
|
||||
<unstableNewThreshold/>
|
||||
<failureThreshold/>
|
||||
<failureNewThreshold/>
|
||||
<unstableThreshold>0</unstableThreshold>
|
||||
<unstableNewThreshold>0</unstableNewThreshold>
|
||||
<failureThreshold>0</failureThreshold>
|
||||
<failureNewThreshold>0</failureNewThreshold>
|
||||
</org.jenkinsci.plugins.xunit.threshold.FailedThreshold>
|
||||
<org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
|
||||
<unstableThreshold/>
|
||||
<unstableNewThreshold/>
|
||||
<failureThreshold/>
|
||||
<failureNewThreshold/>
|
||||
<unstableThreshold>0</unstableThreshold>
|
||||
<unstableNewThreshold>0</unstableNewThreshold>
|
||||
<failureThreshold>0</failureThreshold>
|
||||
<failureNewThreshold>0</failureNewThreshold>
|
||||
</org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
|
||||
</thresholds>
|
||||
<thresholdMode>2</thresholdMode>
|
||||
|
@ -4,15 +4,15 @@ publishers:
|
||||
thresholdmode: 'number'
|
||||
thresholds:
|
||||
- failed:
|
||||
unstable: '1'
|
||||
unstablenew: '2'
|
||||
failure: '3'
|
||||
failurenew: '4'
|
||||
unstable: 1
|
||||
unstablenew: 2
|
||||
failure: 3
|
||||
failurenew: 4
|
||||
- skipped:
|
||||
unstable: '5'
|
||||
unstablenew: '6'
|
||||
failure: '7'
|
||||
failurenew: '8'
|
||||
unstable: 5
|
||||
unstablenew: 6
|
||||
failure: 7
|
||||
failurenew: 8
|
||||
types:
|
||||
- ctest:
|
||||
pattern: "build/tests/reports/ctest.xml"
|
||||
|
30
tests/publishers/fixtures/xunit003.xml
Normal file
30
tests/publishers/fixtures/xunit003.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<publishers>
|
||||
<xunit>
|
||||
<types>
|
||||
<PHPUnitJunitHudsonTestType>
|
||||
<pattern>junit.log</pattern>
|
||||
<failIfNotNew>true</failIfNotNew>
|
||||
<deleteOutputFiles>true</deleteOutputFiles>
|
||||
<skipNoTestFiles>false</skipNoTestFiles>
|
||||
<stopProcessingIfError>true</stopProcessingIfError>
|
||||
</PHPUnitJunitHudsonTestType>
|
||||
</types>
|
||||
<thresholds>
|
||||
<org.jenkinsci.plugins.xunit.threshold.FailedThreshold>
|
||||
<unstableThreshold>10</unstableThreshold>
|
||||
<failureThreshold>5</failureThreshold>
|
||||
</org.jenkinsci.plugins.xunit.threshold.FailedThreshold>
|
||||
<org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
|
||||
<unstableNewThreshold>5</unstableNewThreshold>
|
||||
<failureNewThreshold>10</failureNewThreshold>
|
||||
</org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
|
||||
</thresholds>
|
||||
<thresholdMode>1</thresholdMode>
|
||||
<extraConfiguration>
|
||||
<testTimeMargin>3000</testTimeMargin>
|
||||
</extraConfiguration>
|
||||
</xunit>
|
||||
</publishers>
|
||||
</project>
|
12
tests/publishers/fixtures/xunit003.yaml
Normal file
12
tests/publishers/fixtures/xunit003.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
publishers:
|
||||
- xunit:
|
||||
thresholds:
|
||||
- failed:
|
||||
unstable: 10
|
||||
failure: 5
|
||||
- skipped:
|
||||
unstablenew: 5
|
||||
failurenew: 10
|
||||
types:
|
||||
- phpunit:
|
||||
pattern: "junit.log"
|
Loading…
Reference in New Issue
Block a user