xUnit publisher: add option to skip if there are no tests files
This is valid for each defined xUnit type publisher on the job. Default is false. Change-Id: Idff3c8ba6a4e4291ec483b2eb4a999dcbeea7291 Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br>
This commit is contained in:
parent
5968b57723
commit
81781a4aa8
|
@ -875,6 +875,9 @@ def xunit(parser, xml_parent, data):
|
|||
|
||||
:arg bool deleteoutput: delete temporary JUnit files (default: true)
|
||||
|
||||
:arg bool skip-if-no-test-files: Skip parsing this xUnit type report if \
|
||||
there are no test reports files (default: false).
|
||||
|
||||
:arg bool stoponerror: Fail the build whenever an error occur during \
|
||||
a result file processing (default: true).
|
||||
|
||||
|
@ -936,6 +939,9 @@ def xunit(parser, xml_parent, data):
|
|||
XML.SubElement(xmlframework, 'deleteOutputFiles').text = \
|
||||
str(supported_type[framework_name].get(
|
||||
'deleteoutput', True)).lower()
|
||||
XML.SubElement(xmlframework, 'skipNoTestFiles').text = \
|
||||
str(supported_type[framework_name].get(
|
||||
'skip-if-no-test-files', False)).lower()
|
||||
XML.SubElement(xmlframework, 'stopProcessingIfError').text = \
|
||||
str(supported_type[framework_name].get(
|
||||
'stoponerror', True)).lower()
|
||||
|
|
|
@ -7,12 +7,14 @@
|
|||
<pattern>junit.log</pattern>
|
||||
<failIfNotNew>true</failIfNotNew>
|
||||
<deleteOutputFiles>true</deleteOutputFiles>
|
||||
<skipNoTestFiles>false</skipNoTestFiles>
|
||||
<stopProcessingIfError>true</stopProcessingIfError>
|
||||
</PHPUnitJunitHudsonTestType>
|
||||
<CppUnitJunitHudsonTestType>
|
||||
<pattern>cppunit.log</pattern>
|
||||
<failIfNotNew>true</failIfNotNew>
|
||||
<deleteOutputFiles>true</deleteOutputFiles>
|
||||
<skipNoTestFiles>false</skipNoTestFiles>
|
||||
<stopProcessingIfError>true</stopProcessingIfError>
|
||||
</CppUnitJunitHudsonTestType>
|
||||
</types>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<pattern>build/tests/reports/ctest.xml</pattern>
|
||||
<failIfNotNew>true</failIfNotNew>
|
||||
<deleteOutputFiles>true</deleteOutputFiles>
|
||||
<skipNoTestFiles>true</skipNoTestFiles>
|
||||
<stopProcessingIfError>true</stopProcessingIfError>
|
||||
</CTestType>
|
||||
</types>
|
||||
|
|
|
@ -16,3 +16,4 @@ publishers:
|
|||
types:
|
||||
- ctest:
|
||||
pattern: "build/tests/reports/ctest.xml"
|
||||
skip-if-no-test-files: true
|
||||
|
|
Loading…
Reference in New Issue