@@ -266,7 +266,11 @@ def _bisect_benchmark(argv, bisect_id, email_to):
266
266
primary_suite = mx .primary_suite ()
267
267
268
268
def checkout_enterprise ():
269
+ # First try to get the revision we explicitly specify in ci-overlays. If that doesn't match with graal, then we
270
+ # fall back on mx checkout-downstream
269
271
suite = get_suite ('graalpython' )
272
+ ce_suite = get_suite ('/vm' )
273
+ ce_rev = ce_suite .vc .tip (ce_suite .vc_dir ).strip ()
270
274
ee_suite = get_suite ('/vm-enterprise' )
271
275
overlays = '../ci-overlays'
272
276
if not os .path .isdir (overlays ):
@@ -278,13 +282,20 @@ def checkout_enterprise():
278
282
with open (constants_file ) as f :
279
283
ee_rev = json .load (f )['GRAAL_ENTERPRISE_REVISION' ]
280
284
ee_suite .vc .update_to_branch (ee_suite .vc_dir , ee_rev )
285
+ mx .run_mx (['sforceimports' ], suite = ee_suite )
286
+ if ce_suite .vc .tip (ce_suite .vc_dir ).strip () != ce_rev :
287
+ # The enterprise rev specified in ci-overlays imports newer graal than graalpython does. Fall back to
288
+ # mx checkout-downstream to find older compatible enterprise rev
289
+ ce_suite .vc .update_to_branch (ce_suite .vc_dir , ce_rev )
290
+ mx .run_mx (['checkout-downstream' , 'vm' , 'vm-enterprise' , '--no-fetch' ], suite = ee_suite )
281
291
282
292
def checkout_suite (suite , commit ):
283
293
suite .vc .update_to_branch (suite .vc_dir , commit )
284
294
mx .run_mx (['sforceimports' ], suite = suite )
285
295
mx .run_mx (['--env' , 'ce' , 'sforceimports' ], suite = get_suite ('/vm' ))
286
- if args .enterprise and suite .name != 'vm-enterprise' :
287
- checkout_enterprise ()
296
+ if args .enterprise :
297
+ if suite .name != 'vm-enterprise' :
298
+ checkout_enterprise ()
288
299
# Make sure vm is imported before vm-enterprise
289
300
get_suite ('/vm' )
290
301
mx .run_mx (['--env' , 'ee' , 'sforceimports' ], suite = get_suite ('/vm-enterprise' ))
0 commit comments