@@ -116,9 +116,16 @@ class Test(BaseTest):
116
116
}
117
117
118
118
def evaluateCommand (self , cmd ):
119
+ result = super ().evaluateCommand (cmd )
119
120
if cmd .didFail ():
120
121
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
122
129
123
130
124
131
class Clean (ShellCommand ):
@@ -174,12 +181,12 @@ class UploadTestResults(steps.FileUpload):
174
181
flunkOnFailure = False
175
182
alwaysRun = True
176
183
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 " )
179
186
180
187
def __init__ (self , branch , filename = JUNIT_FILENAME ):
181
188
super ().__init__ (
182
- doStepIf = self ._has_the_build_failed ,
189
+ doStepIf = self ._want_xml_upload ,
183
190
workersrc = filename ,
184
191
masterdest = util .Interpolate (
185
192
f"/data/www/buildbot/test-results/{ branch } /%(prop:buildername)s/build_%(prop:buildnumber)s.xml"
0 commit comments