Skip to content

Commit 3f60b95

Browse files
committed
Build HPy test project before running them
1 parent 9b1cbe7 commit 3f60b95

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,9 +912,12 @@ def _graalpytest_root():
912912
return os.path.join(mx.dependency("com.oracle.graal.python.test").get_output_root(), "bin", "tests")
913913

914914

915+
# name of the project containing the HPy tests
916+
HPY_TEST_PROJECT = "com.oracle.graal.python.hpy.test"
917+
915918
def _hpy_test_root():
916919
# we should just have one source dir
917-
for src_dir in mx.dependency("com.oracle.graal.python.hpy.test").source_dirs():
920+
for src_dir in mx.dependency(HPY_TEST_PROJECT).source_dirs():
918921
return os.path.join(src_dir, "test")
919922

920923

@@ -1130,6 +1133,7 @@ def patch_batch_launcher(launcher_path, jvm_args):
11301133

11311134
def run_hpy_unittests(python_binary, args=None, include_native=True, env=None, nonZeroIsFatal=True, timeout=None, report=False):
11321135
args = [] if args is None else args
1136+
mx.command_function("build")(["--dep", HPY_TEST_PROJECT])
11331137
with tempfile.TemporaryDirectory(prefix='hpy-test-site-') as d:
11341138
env = env or os.environ.copy()
11351139
prefix = str(d)

0 commit comments

Comments
 (0)