Merge "Update valgrind to use convert_mapping_to_xml()"
This commit is contained in:
commit
572150f0ea
@ -5062,21 +5062,26 @@ def valgrind(registry, xml_parent, data):
|
|||||||
for threshold in ['unstable', 'failed']:
|
for threshold in ['unstable', 'failed']:
|
||||||
dthreshold = dthresholds.get(threshold, {})
|
dthreshold = dthresholds.get(threshold, {})
|
||||||
threshold = threshold.replace('failed', 'fail')
|
threshold = threshold.replace('failed', 'fail')
|
||||||
XML.SubElement(p, '%sThresholdInvalidReadWrite' % threshold).text \
|
|
||||||
= str(dthreshold.get('invalid-read-write', ''))
|
|
||||||
XML.SubElement(p, '%sThresholdDefinitelyLost' % threshold).text \
|
|
||||||
= str(dthreshold.get('definitely-lost', ''))
|
|
||||||
XML.SubElement(p, '%sThresholdTotal' % threshold).text \
|
|
||||||
= str(dthreshold.get('total', ''))
|
|
||||||
|
|
||||||
XML.SubElement(p, 'failBuildOnMissingReports').text = str(
|
ThresholdInvalidReadWrite = '%sThresholdInvalidReadWrite' % threshold
|
||||||
data.get('fail-no-reports', False)).lower()
|
ThresholdDefinitelyLost = '%sThresholdDefinitelyLost' % threshold
|
||||||
XML.SubElement(p, 'failBuildOnInvalidReports').text = str(
|
ThresholdTotal = '%sThresholdTotal' % threshold
|
||||||
data.get('fail-invalid-reports', False)).lower()
|
|
||||||
XML.SubElement(p, 'publishResultsForAbortedBuilds').text = str(
|
threshold_mapping = [
|
||||||
data.get('publish-if-aborted', False)).lower()
|
('invalid-read-write', ThresholdInvalidReadWrite, ''),
|
||||||
XML.SubElement(p, 'publishResultsForFailedBuilds').text = str(
|
('definitely-lost', ThresholdDefinitelyLost, ''),
|
||||||
data.get('publish-if-failed', False)).lower()
|
('total', ThresholdTotal, ''),
|
||||||
|
]
|
||||||
|
helpers.convert_mapping_to_xml(
|
||||||
|
p, dthreshold, threshold_mapping, fail_required=True)
|
||||||
|
|
||||||
|
mapping = [
|
||||||
|
('fail-no-reports', 'failBuildOnMissingReports', False),
|
||||||
|
('fail-invalid-reports', 'failBuildOnInvalidReports', False),
|
||||||
|
('publish-if-aborted', 'publishResultsForAbortedBuilds', False),
|
||||||
|
('publish-if-failed', 'publishResultsForFailedBuilds', False),
|
||||||
|
]
|
||||||
|
helpers.convert_mapping_to_xml(p, data, mapping, fail_required=True)
|
||||||
|
|
||||||
|
|
||||||
def pmd(registry, xml_parent, data):
|
def pmd(registry, xml_parent, data):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user