Skip to content

Commit 41755ef

Browse files
steve-stimfel
authored andcommitted
Add unittest run with only uncached interpreter and only cached interpreter
1 parent 93644b1 commit 41755ef

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

ci.jsonnet

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@
137137
local with_compiler = task_spec({
138138
dynamic_imports +:: ["/compiler"],
139139
}),
140+
local unittest_args_gate(args) = task_spec({
141+
tags:: "python-unittest",
142+
environment +: {
143+
GRAALPY_UNITTEST_ARGS: std.join(" ", args),
144+
},
145+
}),
140146

141147
// -----------------------------------------------------------------------------------------------------------------
142148
//
@@ -166,6 +172,12 @@
166172
"python-unittest-native-debug-build": gpgate + platform_spec(no_jobs) + native_debug_build_gate("python-unittest") + platform_spec({
167173
"linux:amd64:jdk-latest" : tier3,
168174
}),
175+
"python-unittest-cached-interpreter": gpgate + unittest_args_gate(["--python.UncachedInterpreterThreshold=0"]) + platform_spec(no_jobs) + platform_spec({
176+
"linux:amd64:jdk-latest" : tier3 + require(GPY_JVM_STANDALONE),
177+
}),
178+
"python-unittest-uncached-interpreter": gpgate + unittest_args_gate(["--python.ForceUncachedInterpreter=true"]) + platform_spec(no_jobs) + platform_spec({
179+
"linux:amd64:jdk-latest" : tier3 + require(GPY_JVM_STANDALONE),
180+
}),
169181
"python-unittest-multi-context": gpgate + require(GPY_NATIVE_STANDALONE) + platform_spec(no_jobs) + platform_spec({
170182
"linux:amd64:jdk-latest" : tier3,
171183
"linux:aarch64:jdk-latest" : daily + t("02:00:00"),

mx.graalpython/mx_graalpython.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,11 +1589,15 @@ def run_python_unittests(python_binary, args=None, paths=None, exclude=None, env
15891589
parallelism = str(min(os.cpu_count() or 1, parallel))
15901590

15911591
args = args or []
1592+
extra_args = shlex.split(os.environ.get("GRAALPY_UNITTEST_ARGS", ""))
1593+
if extra_args:
1594+
mx.log("Adding GraalPy unittest args from GRAALPY_UNITTEST_ARGS: " + shlex.join(extra_args))
15921595
args = [
15931596
"--vm.ea",
15941597
"--experimental-options=true",
15951598
"--python.EnableDebuggingBuiltins",
15961599
*args,
1600+
*extra_args,
15971601
]
15981602

15991603
if env is None:

0 commit comments

Comments
 (0)