@@ -122,6 +122,7 @@ def run_bisect_benchmark(suite, bad, good, callback, threshold=None):
122
122
downstream_bad = get_commit (downstream_suite )
123
123
subresults = {}
124
124
if downstream_bad and downstream_good and downstream_bad != downstream_good :
125
+ suite .vc .update_to_branch (suite .vc_dir , commits [good_index ])
125
126
subresult = run_bisect_benchmark (downstream_suite , downstream_bad , downstream_good , callback , threshold )
126
127
subresults [bad_index ] = subresult
127
128
return BisectResult (suite , commits , values , good_index , bad_index , subresults )
@@ -142,17 +143,13 @@ def repo_name(self):
142
143
143
144
@property
144
145
def good_commit (self ):
145
- try :
146
+ if 0 <= self . good_index < len ( self . commits ) :
146
147
return self .commits [self .good_index ]
147
- except IndexError :
148
- return None
149
148
150
149
@property
151
150
def bad_commit (self ):
152
- try :
151
+ if 0 <= self . bad_index < len ( self . commits ) :
153
152
return self .commits [self .bad_index ]
154
- except IndexError :
155
- return None
156
153
157
154
def visualize (self , level = 1 ):
158
155
level_marker = '=' * level
@@ -212,15 +209,16 @@ def benchmark_callback(suite, commit):
212
209
if fetched_enterprise [0 ]:
213
210
checkout_args .append ('--no-fetch' )
214
211
mx .run_mx (checkout_args , out = mx .OutputCapture ())
212
+ # Make sure vm is imported before vm-enterprise
213
+ get_suite ('/vm' )
215
214
mx .run_mx (['--env' , 'ee' , 'sforceimports' ], suite = get_suite ('/vm-enterprise' ))
216
215
fetched_enterprise [0 ] = True
217
- elif suite .name != 'vm' :
218
- mx .run_mx (['--env' , 'ce' , 'sforceimports' ], suite = get_suite ('/vm' ))
219
216
suite .vc .update_to_branch (suite .vc_dir , commit )
220
217
mx .run_mx (['sforceimports' ], suite = suite )
218
+ print ("debug: graalpython={} graal={} graal-enterprise={}"
219
+ .format (* (get_commit (get_suite (s )) for s in ('graalpython' , '/vm' , '/vm-enterprise' ))))
221
220
env = os .environ .copy ()
222
- if 'CI' not in os .environ :
223
- env ['MX_ALT_OUTPUT_ROOT' ] = 'mxbuild-{}' .format (commit )
221
+ env ['MX_ALT_OUTPUT_ROOT' ] = 'mxbuild-{}' .format (commit )
224
222
retcode = mx .run (shlex .split (args .build_command ), env = env , nonZeroIsFatal = False )
225
223
if retcode :
226
224
raise RuntimeError ("Failed to execute the build command for {}" .format (commit ))
0 commit comments