Skip to content

Commit 64ac1c4

Browse files
authored
Upload results XML for warning stable builds (#608)
1 parent ee82164 commit 64ac1c4

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

master/custom/steps.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,16 @@ class Test(BaseTest):
116116
}
117117

118118
def evaluateCommand(self, cmd):
119+
result = super().evaluateCommand(cmd)
119120
if cmd.didFail():
120121
self.setProperty("test_failed_to_build", True)
121-
return super().evaluateCommand(cmd)
122+
self.setProperty("want_xml_upload", True)
123+
elif result == WARNINGS:
124+
# For warnings, upload XML for main branch stable builders
125+
tags = self.build.builder.config.tags
126+
if 'stable' in tags and '3.x' in tags:
127+
self.setProperty("want_xml_upload", True)
128+
return result
122129

123130

124131
class Clean(ShellCommand):
@@ -174,12 +181,12 @@ class UploadTestResults(steps.FileUpload):
174181
flunkOnFailure = False
175182
alwaysRun = True
176183

177-
def _has_the_build_failed(self, build):
178-
return self.getProperty("test_failed_to_build")
184+
def _want_xml_upload(self, build):
185+
return self.getProperty("want_xml_upload")
179186

180187
def __init__(self, branch, filename=JUNIT_FILENAME):
181188
super().__init__(
182-
doStepIf=self._has_the_build_failed,
189+
doStepIf=self._want_xml_upload,
183190
workersrc=filename,
184191
masterdest=util.Interpolate(
185192
f"/data/www/buildbot/test-results/{branch}/%(prop:buildername)s/build_%(prop:buildnumber)s.xml"

0 commit comments

Comments
 (0)