@@ -158,10 +158,14 @@ local part_definitions = {
158
158
local url = ["mx" , "urlrewrite" , "https://github.com/graalvm/graal-enterprise.git" ],
159
159
repo = "../graal-enterprise" ,
160
160
suite_file = "graal-enterprise/mx.graal-enterprise/suite.py" ,
161
- find_commit_importing_truffle = ["git" , "-C" , repo, "log" , "--reverse" , "--pretty=%H" , "-m" , "-S" ] + jt(["truffle_version" ]) + ["--grep=PullRequest:" , suite_file, "|" , "head" , "-1" ];
161
+ # Find the latest merge commit of a pull request in the graal repo, equal or older than our graal import.
162
+ merge_commit_in_graal = ["git" , "-C" , "../graal" , "log" , "--pretty=%H" , "--grep=PullRequest:" , "--merges" , "-n1" ] + jt(["truffle_version" ]),
163
+ # Find the commit importing that version of graal in graal-enterprise by looking at the suite file.
164
+ # The suite file is automatically updated on every graal PR merged.
165
+ graal_enterprise_commit = ["git" , "-C" , repo, "log" , "--pretty=%H" , "--grep=PullRequest:" , "--reverse" , "-m" , "-S" , merge_commit_in_graal, suite_file, "|" , "head" , "-1" ];
162
166
[
163
167
["git" , "clone" , url, repo],
164
- ["git" , "-C" , repo, "checkout" , find_commit_importing_truffle ],
168
+ ["git" , "-C" , repo, "checkout" , graal_enterprise_commit ],
165
169
],
166
170
167
171
setup+: self .clone + jt(["build" , "--dy" , "/graal-enterprise" ]),
0 commit comments