@@ -138,7 +138,6 @@ local part_definitions = {
138
138
is_after+:: ["$.use.build" ],
139
139
setup+: [
140
140
["cd" , "../graal/compiler" ],
141
- ["mx" , "sversions" ],
142
141
["mx" , "build" ],
143
142
["cd" , "../../main" ],
144
143
],
@@ -159,18 +158,20 @@ local part_definitions = {
159
158
},
160
159
161
160
enterprise: {
162
- # Otherwise the TruffleRuby build will change the runtime Truffle version
163
161
is_after+:: ["$.use.build" ],
164
- setup+: [
165
- [
166
- "git" ,
167
- "clone" ,
168
- ["mx" , "urlrewrite" , "https://github.com/graalvm/graal-enterprise.git" ],
169
- "../graal-enterprise" ,
170
- ],
162
+
163
+ clone::
164
+ local url = ["mx" , "urlrewrite" , "https://github.com/graalvm/graal-enterprise.git" ],
165
+ repo = "../graal-enterprise" ,
166
+ suite_file = "graal-enterprise/mx.graal-enterprise/suite.py" ,
167
+ find_commit_importing_truffle = ["git" , "-C" , repo, "log" , "--reverse" , "--pretty=%H" , "-m" , "-S" ] + jt(["truffle_version" ]) + ["--grep=PullRequest:" , suite_file, "|" , "head" , "-1" ];
168
+ [
169
+ ["git" , "clone" , url, repo],
170
+ ["git" , "-C" , repo, "checkout" , find_commit_importing_truffle],
171
+ ],
172
+
173
+ setup+: self .clone + [
171
174
["cd" , "../graal-enterprise/graal-enterprise" ],
172
- ["mx" , "sforceimports" ],
173
- ["mx" , "sversions" ],
174
175
["mx" , "build" ],
175
176
["cd" , "../../main" ],
176
177
],
@@ -198,13 +199,6 @@ local part_definitions = {
198
199
199
200
svm_suite:: "/substratevm" ,
200
201
201
- setup+: [
202
- ["cd" , "../graal/substratevm" ],
203
- ["mx" , "sforceimports" ],
204
- ["mx" , "sversions" ],
205
- ["cd" , "../../main" ],
206
- ],
207
-
208
202
environment+: {
209
203
HOST_VM_CONFIG: "graal-core" ,
210
204
GRAAL_HOME: "$BUILD_DIR/graal/compiler" ,
@@ -213,23 +207,11 @@ local part_definitions = {
213
207
},
214
208
215
209
enterprise: {
216
- # Otherwise the TruffleRuby build will change the runtime Truffle version
217
210
is_after+:: ["$.use.build" ],
218
211
219
212
svm_suite:: "/substratevm-enterprise" ,
220
213
221
- setup+: [
222
- [
223
- "git" ,
224
- "clone" ,
225
- ["mx" , "urlrewrite" , "https://github.com/graalvm/graal-enterprise.git" ],
226
- "../graal-enterprise" ,
227
- ],
228
- ["cd" , "../graal-enterprise/substratevm-enterprise" ],
229
- ["mx" , "sforceimports" ],
230
- ["mx" , "sversions" ],
231
- ["cd" , "../../main" ],
232
- ],
214
+ setup+: $.graal.enterprise.clone,
233
215
234
216
environment+: {
235
217
HOST_VM_CONFIG: "graal-enterprise" ,
0 commit comments