Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fc368a8
Dedicated directory with manual BCI unit test tags
steve-s Dec 1, 2025
7ee0bcd
Make Bytecode DSL the default
steve-s Nov 28, 2025
f494ee7
Ignore test_print_exception_gh_102056
steve-s Dec 3, 2025
b1b6d6a
Adapt test_sys_settrace to new test utils
steve-s Dec 3, 2025
b9be23b
Fix assertion 'every bytecode range should have been converted' in co…
steve-s Dec 3, 2025
7ad7ac4
Ignore stack size stability tests, issue: GR-64479
steve-s Dec 3, 2025
8cd7a40
Ignore test_next_until_return_in_generator, issue: GR-71863
steve-s Dec 3, 2025
78ac8a5
Ignore test_sys_settrace tests that give wrong return statement line,…
steve-s Dec 3, 2025
3651170
Ignore tests in test_sys_setprofile and test_trace, issue GR-71865
steve-s Dec 3, 2025
537852b
Ignore few more tagged tests, issues: GR-71869, GR-71867, GR-71866
steve-s Dec 3, 2025
ba92e2a
Ignore two tests in test_syntax, issue GR-71364
steve-s Dec 3, 2025
4785ca6
Trash temporary locals after destructive assignment to pass test_call…
steve-s Dec 4, 2025
15166b2
Ignore TestExpressionStackSize.test_if_else, issue GR-64307
steve-s Dec 4, 2025
2fb4b56
Ignore test_type_annotations.test_match, issue: GR-71365
steve-s Dec 4, 2025
fd48d3f
Ignore few tests in test_inspect, issue: GR-71889
steve-s Dec 5, 2025
5146bbf
Ignore GC tests in test_memoryio, issue: GR-71890
steve-s Dec 5, 2025
a2c9fe4
Ignore test_descr:test_remove_subclass, issue: GR-71917
steve-s Dec 5, 2025
82e6c63
Ignore few test_(c)profile tests, issue: GR-71916
steve-s Dec 5, 2025
ec4190e
Ignore few tests in test_pdb, issue: GR-71918
steve-s Dec 5, 2025
5f3d39f
Ignore HPy test_HPyErr_WarnEx, issue GR-71943
steve-s Dec 9, 2025
67a3f06
Properly disable PythonDebugTest on Bytecode DSL, issue GR-71618
steve-s Dec 9, 2025
587ace5
Fix graalpy-extensions deployment
steve-s Dec 10, 2025
b12ffbe
Fix PythonContext leak through bytecode parser
steve-s Dec 10, 2025
04167a2
Remove Bytecode DSL handling in fork_exec to fix pip installation in …
steve-s Dec 11, 2025
7b244ab
Run TCK without VerifierInstrument, issue GR-71979
steve-s Dec 12, 2025
d796222
Remove Bytecode DSL config from benchmarks
steve-s Dec 12, 2025
08772cd
Workaround Gradle failure in CI
steve-s Dec 12, 2025
4a0e3ce
Fix java_args overriding in mx_graalpython
steve-s Dec 12, 2025
cc60636
Increase the stack size limit for SandboxPolicyUntrustedTest
steve-s Dec 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 19 additions & 18 deletions ci.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,17 @@
local bench_task(bench=null, benchmarks=BENCHMARKS) = super.bench_task(bench=bench, benchmarks=benchmarks),
local bisect_bench_task = self.bisect_bench_task,

local bytecode_dsl_env = task_spec({
// Manual interpreter variants (DSL disabled)
local manual_interpreter_env = task_spec({
environment +: {
BYTECODE_DSL_INTERPRETER: "true"
BYTECODE_DSL_INTERPRETER: "false"
},
}),
local bytecode_dsl_gate(name) = bytecode_dsl_env + task_spec({
local manual_interpreter_gate(name) = manual_interpreter_env + task_spec({
tags :: name,
}),
local bytecode_dsl_bench = bytecode_dsl_env + task_spec({
name_suffix +:: ["bytecode-dsl"],
local manual_interpreter_bench = manual_interpreter_env + task_spec({
name_suffix +:: ["manual-interpreter"],
}),

// -----------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -116,7 +117,7 @@
"darwin:aarch64:jdk-latest" : tier3 + provide(GPY_JVM_STANDALONE),
"windows:amd64:jdk-latest" : tier3 + provide(GPY_JVM_STANDALONE),
}),
"python-unittest-bytecode-dsl": gpgate + platform_spec(no_jobs) + bytecode_dsl_gate("python-unittest") + platform_spec({
"python-unittest-manual-interpreter": gpgate + platform_spec(no_jobs) + manual_interpreter_gate("python-unittest") + platform_spec({
"linux:amd64:jdk-latest" : daily + t("01:00:00"),
"linux:aarch64:jdk-latest" : daily + t("01:00:00"),
"darwin:aarch64:jdk-latest" : daily + t("01:00:00"),
Expand Down Expand Up @@ -170,7 +171,7 @@
"darwin:aarch64:jdk-latest" : tier3 + require(GRAAL_JDK_LATEST),
"windows:amd64:jdk-latest" : tier3 + require(GRAAL_JDK_LATEST),
}),
"python-junit-bytecode-dsl": gpgate + platform_spec(no_jobs) + bytecode_dsl_gate("python-junit") + platform_spec({
"python-junit-manual-interpreter": gpgate + platform_spec(no_jobs) + manual_interpreter_gate("python-junit") + platform_spec({
"linux:amd64:jdk-latest" : tier3 + require(GRAAL_JDK_LATEST),
}),
"python-junit-maven": gpgate_maven + platform_spec(no_jobs) + platform_spec({
Expand Down Expand Up @@ -204,12 +205,12 @@
],
}),
}),
"python-pgo-profile-bytecode-dsl": gpgate_ee + bytecode_dsl_env + platform_spec(no_jobs) + platform_spec({
"python-pgo-profile-manual-interpreter": gpgate_ee + manual_interpreter_env + platform_spec(no_jobs) + platform_spec({
"linux:amd64:jdk-latest" : post_merge + t("01:30:00") + task_spec({
run: [["mx", "python-native-pgo"]],
logs+: [
"default-bytecode-dsl.iprof.gz",
"default-bytecode-dsl.lcov",
"default-manual-interpreter.iprof.gz",
"default-manual-interpreter.lcov",
],
}),
}),
Expand All @@ -219,7 +220,7 @@
"darwin:aarch64:jdk-latest" : tier3 + require(GPY_NATIVE_STANDALONE),
"windows:amd64:jdk-latest" : tier3 + require(GPY_NATIVE_STANDALONE) + batches(2),
}),
"python-svm-unittest-bytecode-dsl": gpgate + platform_spec(no_jobs) + bytecode_dsl_gate("python-svm-unittest") + platform_spec({
"python-svm-unittest-manual-interpreter": gpgate + platform_spec(no_jobs) + manual_interpreter_gate("python-svm-unittest") + platform_spec({
"linux:amd64:jdk-latest" : tier2 + provide(GPY_NATIVE_BYTECODE_DSL_STANDALONE),
}),
"python-tagged-unittest": gpgate + require(GPY_NATIVE_STANDALONE) + batches(TAGGED_UNITTESTS_SPLIT) + platform_spec(no_jobs) + platform_spec({
Expand All @@ -228,7 +229,7 @@
"darwin:aarch64:jdk-latest" : tier3,
"windows:amd64:jdk-latest" : daily + t("02:00:00"),
}),
"python-tagged-unittest-bytecode-dsl": gpgate + require(GPY_NATIVE_BYTECODE_DSL_STANDALONE) + batches(TAGGED_UNITTESTS_SPLIT) + bytecode_dsl_gate("python-tagged-unittest") + platform_spec(no_jobs) + platform_spec({
"python-tagged-unittest-manual-interpreter": gpgate + require(GPY_NATIVE_BYTECODE_DSL_STANDALONE) + batches(TAGGED_UNITTESTS_SPLIT) + manual_interpreter_gate("python-tagged-unittest") + platform_spec(no_jobs) + platform_spec({
"linux:amd64:jdk-latest" : tier3,
}),
"python-graalvm": gpgate + platform_spec(no_jobs) + platform_spec({
Expand Down Expand Up @@ -288,7 +289,7 @@
},

local need_pgo = task_spec({runAfter: ["python-pgo-profile-post_merge-linux-amd64-jdk-latest"]}),
local need_bc_pgo = task_spec({runAfter: ["python-pgo-profile-bytecode-dsl-post_merge-linux-amd64-jdk-latest"]}),
local need_bc_pgo = task_spec({runAfter: ["python-pgo-profile-manual-interpreter-post_merge-linux-amd64-jdk-latest"]}),
local forks_warmup = forks("./mx.graalpython/warmup-fork-counts.json"),
local forks_meso = forks("meso.json"),
local raw_results = task_spec({
Expand Down Expand Up @@ -316,7 +317,7 @@
}),
for bench in ["micro", "meso", "macro"]
} + {
[bench + "-bytecode-dsl"]: bench_task(bench) + bytecode_dsl_bench + platform_spec(no_jobs) + bench_variants({
[bench + "-manual-interpreter"]: bench_task(bench) + manual_interpreter_bench + platform_spec(no_jobs) + bench_variants({
"vm_name:graalvm_ee_default_bc_dsl" : {"linux:amd64:jdk-latest" : daily + t("08:00:00")},
"vm_name:graalpython_enterprise_bc_dsl" : {"linux:amd64:jdk-latest" : daily + t("08:00:00")},
}),
Expand Down Expand Up @@ -351,7 +352,7 @@
}),
for bench in ["micro_small", "meso_small"]
} + {
[bench + "-bytecode-dsl"]: bench_task(bench) + bytecode_dsl_bench + platform_spec(no_jobs) + bench_variants({
[bench + "-manual-interpreter"]: bench_task(bench) + manual_interpreter_bench + platform_spec(no_jobs) + bench_variants({
"vm_name:graalvm_ee_default_interpreter_bc_dsl" : {"linux:amd64:jdk-latest" : daily + t("04:00:00")},
"vm_name:graalpython_enterprise_interpreter_bc_dsl" : {"linux:amd64:jdk-latest" : weekly + t("04:00:00")},
}),
Expand Down Expand Up @@ -384,7 +385,7 @@
}),
for bench in ["warmup"]
} + {
[bench + "-bytecode-dsl"]: bench_task(bench) + bytecode_dsl_bench + platform_spec(no_jobs) + bench_variants({
[bench + "-manual-interpreter"]: bench_task(bench) + manual_interpreter_bench + platform_spec(no_jobs) + bench_variants({
"vm_name:graalvm_ee_default_bc_dsl" : {"linux:amd64:jdk-latest" : on_demand + t("05:00:00") + forks_warmup},
"vm_name:graalpython_enterprise_bc_dsl" : {"linux:amd64:jdk-latest" : on_demand + t("05:00:00") + forks_warmup},
}),
Expand All @@ -397,7 +398,7 @@
}),
for bench in ["heap", "micro_small_heap"]
} + {
[bench + "-bytecode-dsl"]: bench_task(bench) + bytecode_dsl_bench + platform_spec(no_jobs) + bench_variants({
[bench + "-manual-interpreter"]: bench_task(bench) + manual_interpreter_bench + platform_spec(no_jobs) + bench_variants({
"vm_name:graalvm_ee_default_interpreter_bc_dsl" : {"linux:amd64:jdk-latest" : post_merge + t("02:00:00") + need_bc_pgo},
"vm_name:graalpython_enterprise_interpreter_bc_dsl" : {"linux:amd64:jdk-latest" : weekly + t("02:00:00")},
}),
Expand Down Expand Up @@ -429,7 +430,7 @@
for bench in ["pyperformance"]
} + {
// Bytecode DSL benchmarks with community benchmark suites for external numbers
[bench + "-bytecode-dsl"]: bench_task(bench, PY_BENCHMARKS) + bytecode_dsl_bench + platform_spec(no_jobs) + raw_results + bench_variants({
[bench + "-manual-interpreter"]: bench_task(bench, PY_BENCHMARKS) + manual_interpreter_bench + platform_spec(no_jobs) + raw_results + bench_variants({
"vm_name:graalvm_ee_default_bc_dsl" : {"linux:amd64:jdk-latest" : weekly + t("08:00:00")},
}),
for bench in ["pyperformance"]
Expand Down
4 changes: 3 additions & 1 deletion ci/python-gate.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@
windows: {
common: {
PATH: "$MAVEN_HOME\\bin;$PATH",
# Gradle: this feature doesn't work on all Windows CI machines
GRADLE_OPTS: "-Dorg.gradle.vfs.watch=false",
},
amd64: {},
aarch64: {},
Expand Down Expand Up @@ -419,7 +421,7 @@
environment+: $.environment(self.os, self.arch),
packages+: $.packages(self.os, self.arch),
run+: [
["mx"] + self.mx_parameters + self.dy + self.primary_suite + [
["mx", "--J", "@-Dtck.inlineVerifierInstrument=false"] + self.mx_parameters + self.dy + self.primary_suite + [
"--strict-compliance", "--primary", "gate", "--tags", self.tags, "-B=--force-deprecation-as-warning",
] + self.all_suites + self.gate_parameters,
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ private static Value run(String source) {
.option("sandbox.MaxHeapMemory", "800MB") //
.option("sandbox.MaxCPUTime", "10s") //
.option("sandbox.MaxASTDepth", "100") //
.option("sandbox.MaxStackFrames", "10") //
// encodings import during ctx init takes 19 frames and that's the deepest
.option("sandbox.MaxStackFrames", "25") //
.option("sandbox.MaxThreads", "1") //
.option("sandbox.MaxOutputStreamSize", "1MB") //
.option("sandbox.MaxErrorStreamSize", "1MB") //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
*/
package com.oracle.graal.python.test.debug;

import static com.oracle.graal.python.test.integration.PythonTests.eval;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
Expand All @@ -58,6 +59,7 @@
import org.graalvm.polyglot.Context;
import org.graalvm.polyglot.Context.Builder;
import org.graalvm.polyglot.Source;
import org.graalvm.polyglot.Value;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
Expand Down Expand Up @@ -93,7 +95,9 @@ public void dispose() {

@Test
public void testSteppingAsExpected() throws Throwable {
Assume.assumeFalse("TODO: debugger tests are broken on Bytecode DSL", Boolean.getBoolean("python.EnableBytecodeDSLInterpreter"));
Value isBytecodeDLS = eval("__graalpython__.is_bytecode_dsl_interpreter");
// GR-71618
Assume.assumeFalse("TODO: wrong stacktrace", isBytecodeDLS.asBoolean());
// test that various elements step as expected, including generators, statement level atomic
// expressions, and roots
final Source source = Source.newBuilder("python", "" +
Expand Down Expand Up @@ -186,7 +190,9 @@ public void testSteppingAsExpected() throws Throwable {

@Test
public void testException() throws Throwable {
Assume.assumeFalse("TODO: debugger tests are broken on Bytecode DSL", Boolean.getBoolean("python.EnableBytecodeDSLInterpreter"));
Value isBytecodeDLS = eval("__graalpython__.is_bytecode_dsl_interpreter");
// GR-71618
Assume.assumeFalse("TODO: wrong stacktrace", isBytecodeDLS.asBoolean());
final Source source = Source.newBuilder("python", "" +
"try:\n" +
" 1 / 0\n" +
Expand All @@ -210,7 +216,9 @@ public void testException() throws Throwable {

@Test
public void testInlineEvaluation() throws Throwable {
Assume.assumeFalse("TODO: debugger tests are broken on Bytecode DSL", Boolean.getBoolean("python.EnableBytecodeDSLInterpreter"));
Value isBytecodeDLS = eval("__graalpython__.is_bytecode_dsl_interpreter");
// GR-71618
Assume.assumeFalse("TODO: wrong stacktrace", isBytecodeDLS.asBoolean());
final Source source = Source.newBuilder("python", "" +
"y = 4\n" +
"def foo(x):\n" +
Expand Down Expand Up @@ -245,7 +253,9 @@ public void testInlineEvaluation() throws Throwable {
@Test
@SuppressWarnings("try")
public void testBreakpointBuiltin() throws Throwable {
Assume.assumeFalse("TODO: debugger tests are broken on Bytecode DSL", Boolean.getBoolean("python.EnableBytecodeDSLInterpreter"));
Value isBytecodeDLS = eval("__graalpython__.is_bytecode_dsl_interpreter");
// GR-71618
Assume.assumeFalse("TODO: wrong stacktrace", isBytecodeDLS.asBoolean());
final Source source = Source.newBuilder("python", "" +
"def foo():\n" +
" a = 1\n" +
Expand All @@ -267,7 +277,9 @@ public void testBreakpointBuiltin() throws Throwable {

@Test
public void testConditionalBreakpointInFunction() throws Throwable {
Assume.assumeFalse("TODO: debugger tests are broken on Bytecode DSL", Boolean.getBoolean("python.EnableBytecodeDSLInterpreter"));
Value isBytecodeDLS = eval("__graalpython__.is_bytecode_dsl_interpreter");
// GR-71618
Assume.assumeFalse("TODO: wrong stacktrace", isBytecodeDLS.asBoolean());
final Source source = Source.newBuilder("python", "" +
"def fun():\n" +
" def prod(n):\n" +
Expand Down Expand Up @@ -313,7 +325,9 @@ public void testConditionalBreakpointInFunction() throws Throwable {

@Test
public void testConditionalBreakpointGlobal() throws Throwable {
Assume.assumeFalse("TODO: debugger tests are broken on Bytecode DSL", Boolean.getBoolean("python.EnableBytecodeDSLInterpreter"));
Value isBytecodeDLS = eval("__graalpython__.is_bytecode_dsl_interpreter");
// GR-71618
Assume.assumeFalse("TODO: wrong stacktrace", isBytecodeDLS.asBoolean());
final Source source = Source.newBuilder("python", "" +
"values = []\n" +
"for i in range(0, 10):\n" +
Expand All @@ -337,7 +351,9 @@ public void testConditionalBreakpointGlobal() throws Throwable {

@Test
public void testReenterArgumentsAndValues() throws Throwable {
Assume.assumeFalse("TODO: debugger tests are broken on Bytecode DSL", Boolean.getBoolean("python.EnableBytecodeDSLInterpreter"));
Value isBytecodeDLS = eval("__graalpython__.is_bytecode_dsl_interpreter");
// GR-71618
Assume.assumeFalse("TODO: wrong stacktrace", isBytecodeDLS.asBoolean());
// Test that after a re-enter, arguments are kept and variables are cleared.
final Source source = Source.newBuilder("python", "" +
"def main():\n" +
Expand Down Expand Up @@ -392,7 +408,9 @@ public void testReenterArgumentsAndValues() throws Throwable {
@Test
@SuppressWarnings("deprecation")
public void testGettersSetters() throws Throwable {
Assume.assumeFalse("TODO: debugger tests are broken on Bytecode DSL", Boolean.getBoolean("python.EnableBytecodeDSLInterpreter"));
Value isBytecodeDLS = eval("__graalpython__.is_bytecode_dsl_interpreter");
// GR-71618
Assume.assumeFalse("TODO: wrong stacktrace", isBytecodeDLS.asBoolean());
final Source source = Source.newBuilder("python", "" +
"class GetterOnly:\n" +
" def __get__(self):\n" +
Expand Down Expand Up @@ -462,7 +480,9 @@ public void testGettersSetters() throws Throwable {

@Test
public void testInspectJavaArray() throws Throwable {
Assume.assumeFalse("TODO: debugger tests are broken on Bytecode DSL", Boolean.getBoolean("python.EnableBytecodeDSLInterpreter"));
Value isBytecodeDLS = eval("__graalpython__.is_bytecode_dsl_interpreter");
// GR-71618
Assume.assumeFalse("TODO: wrong stacktrace", isBytecodeDLS.asBoolean());
final Source source = Source.newBuilder("python", "" +
"import java\n" +
"a_int = java.type('int[]')(3)\n" +
Expand Down Expand Up @@ -508,7 +528,9 @@ public void testInspectJavaArray() throws Throwable {

@Test
public void testSourceFileURI() throws Throwable {
Assume.assumeFalse("TODO: debugger tests are broken on Bytecode DSL", Boolean.getBoolean("python.EnableBytecodeDSLInterpreter"));
Value isBytecodeDLS = eval("__graalpython__.is_bytecode_dsl_interpreter");
// GR-71618
Assume.assumeFalse("TODO: wrong stacktrace", isBytecodeDLS.asBoolean());
if (System.getProperty("os.name").toLowerCase().contains("mac")) {
// on the mac machines we run with symlinked directories and such and it's annoying to
// cater for that
Expand Down
6 changes: 3 additions & 3 deletions graalpython/com.oracle.graal.python.test/src/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,10 +956,10 @@ def parse_config(cls, config_path: Path):
tags_dir = None
if config_tags_dir := settings.get('tags_dir'):
tags_dir = (config_path.parent / config_tags_dir).resolve()
# Temporary hack for Bytecode DSL development in master branch:
# Temporary hack for the period when we support both Bytecode DSL and manual interpreter
# noinspection PyUnresolvedReferences
if IS_GRAALPY and getattr(__graalpython__, 'is_bytecode_dsl_interpreter', False) and tags_dir:
new_tags_dir = (config_path.parent / (config_tags_dir + '_bytecode_dsl')).resolve()
if IS_GRAALPY and not getattr(__graalpython__, 'is_bytecode_dsl_interpreter', False) and tags_dir:
new_tags_dir = (config_path.parent / (config_tags_dir + '_manual_bci')).resolve()
if new_tags_dir.exists():
tags_dir = new_tags_dir
return cls(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@
is_enabled = 'ENABLE_STANDALONE_UNITTESTS' in os.environ and os.environ['ENABLE_STANDALONE_UNITTESTS'] == "true"
constraints_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'constraints.txt')

class TemporaryTestDirectory():
def __init__(self):
if 'STANDALONE_UNITTESTS_NO_CLEAN' in os.environ:
self.ctx = None
self.name = tempfile.mkdtemp()
print(f"Running test in {self.name}")
else:
self.ctx = tempfile.TemporaryDirectory()
self.name = self.ctx.name

def __enter__(self):
return self.name

def __exit__(self, exc_type, exc_val, exc_tb):
if self.ctx:
self.ctx.__exit__(exc_type, exc_val, exc_tb)

def create_test_env():
env = os.environ.copy()
env["MVN_GRAALPY_VERSION"] = util.get_graalvm_version()
Expand All @@ -59,7 +76,7 @@ def test_native_executable_one_file():
return

env = create_test_env()
with tempfile.TemporaryDirectory() as tmpdir:
with TemporaryTestDirectory() as tmpdir:

source_file = os.path.join(tmpdir, "hello.py")
with open(source_file, 'w') as f:
Expand Down Expand Up @@ -88,7 +105,7 @@ def test_native_executable_venv_and_one_file():
return

env = create_test_env()
with tempfile.TemporaryDirectory() as target_dir:
with TemporaryTestDirectory() as target_dir:
source_file = os.path.join(target_dir, "hello.py")
with open(source_file, 'w') as f:
f.write("from termcolor import colored, cprint\n")
Expand Down Expand Up @@ -130,7 +147,7 @@ def test_native_executable_module():
return

env = create_test_env()
with tempfile.TemporaryDirectory() as tmp_dir:
with TemporaryTestDirectory() as tmp_dir:

module_dir = os.path.join(tmp_dir, "hello_app")
os.makedirs(module_dir, exist_ok=True)
Expand Down
Loading