Skip to content

Commit 93aee84

Browse files
committed
[GR-65161] Fix Sulong coverage jobs.
PullRequest: graal/20925
2 parents 0cbb62d + 760a709 commit 93aee84

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

sulong/ci/ci.jsonnet

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ local sc = (import "ci_common/sulong-common.jsonnet");
1212

1313
sulong:: {
1414
suite:: "sulong",
15-
extra_mx_args+:: [ "--dynamicimport", "/compiler" ],
15+
extra_mx_args+:: if self._jdkIsGraalVM then [] else [ "--dynamicimport", "/compiler" ],
1616
setup+: [
1717
["cd", "./sulong"],
1818
],
@@ -120,11 +120,11 @@ local sc = (import "ci_common/sulong-common.jsonnet");
120120
coverage_builds::
121121
sc.mapPrototypePlatformName([sc.weekly + $.sulong + sc.coverage($.regular_builds)],
122122
[
123-
[sc.linux_amd64, [sc.labsjdk21]],
124-
[sc.darwin_amd64, [sc.labsjdk21]],
125-
[sc.windows_amd64, [sc.labsjdk21]],
126-
[sc.linux_aarch64, [sc.labsjdk21]],
127-
[sc.darwin_aarch64, [sc.labsjdk21]],
123+
[sc.linux_amd64, [sc.graalvmee21]],
124+
[sc.darwin_amd64, [sc.graalvmee21]],
125+
[sc.windows_amd64, [sc.graalvmee21]],
126+
[sc.linux_aarch64, [sc.graalvmee21]],
127+
[sc.darwin_aarch64, [sc.graalvmee21]],
128128
],
129129
[
130130
{ name: "weekly-sulong-coverage-jdk21-linux-amd64", timelimit: "2:00:00" },

sulong/ci/ci_common/sulong-common.jsonnet

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ local sulong_deps = common.deps.sulong;
166166
skipPlatform:: coverageTags == [],
167167
gateTags:: ["build"] + coverageTags,
168168
# The Jacoco annotations interfere with partial evaluation. Use the DefaultTruffleRuntime to disable compilation just for the coverage runs.
169-
extra_mx_args+: ["--no-jacoco-exclude-truffle", "-J-Dtruffle.TruffleRuntime=com.oracle.truffle.api.impl.DefaultTruffleRuntime", "-J-Dpolyglot.engine.WarnInterpreterOnly=false"],
169+
extra_mx_args+: ["-J-Dtruffle.TruffleRuntime=com.oracle.truffle.api.impl.DefaultTruffleRuntime", "-J-Dpolyglot.engine.WarnInterpreterOnly=false"],
170170
extra_gate_args+: ["--jacoco-relativize-paths", "--jacoco-omit-src-gen", "--jacocout", "coverage", "--jacoco-format", "lcov"],
171171
teardown+: [
172172
["mx", "sversions", "--print-repositories", "--json", "|", "coverage-uploader.py", "--associated-repos", "-"],
@@ -193,8 +193,14 @@ local sulong_deps = common.deps.sulong;
193193
},
194194
} + {
195195

196-
[std.strReplace(name, "-", "_")]: common[name]
196+
[std.strReplace(name, "-", "_")]: common[name] + { _jdkIsGraalVM:: false }
197197
for name in std.objectFieldsAll(common)
198198
if std.startsWith(name, "labsjdk")
199199

200+
} + {
201+
202+
[name]: common[name] + { _jdkIsGraalVM:: true }
203+
for name in std.objectFieldsAll(common)
204+
if std.startsWith(name, "graalvm")
205+
200206
}

sulong/mx.sulong/mx_sulong_gate.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,13 @@ def _unittest(title, test_suite, tags=None, testClasses=None, unittestArgs=None,
158158
else:
159159
slowStandalone = standaloneMode == "jvm"
160160

161-
with Task('Build GraalJDK', tasks, tags=['standalone']) as t:
162-
# building GraalJDK to work around a bug in the mx support code of the compiler suite
163-
# `mx unittest` doesn't work if this is not built, and we want to avoid doing a full `mx build` in the standalone jobs
164-
if t:
165-
import mx_compiler
166-
mx.command_function('build')(['--dependencies', mx_compiler._graaljdk_dist(edition='ce').name])
161+
if mx.suite('compiler', fatalIfMissing=False):
162+
with Task('Build GraalJDK', tasks, tags=['standalone']) as t:
163+
# building GraalJDK to work around a bug in the mx support code of the compiler suite
164+
# `mx unittest` doesn't work if compiler is imported and this is not built, and we want to avoid doing a full `mx build` in the standalone jobs
165+
if t:
166+
import mx_compiler
167+
mx.command_function('build')(['--dependencies', mx_compiler._graaljdk_dist(edition='ce').name])
167168

168169
if standaloneMode == "native":
169170
with Task('Build Native LLVM Standalone', tasks, tags=['standalone']) as t:

0 commit comments

Comments
 (0)