Skip to content

Commit 910cc65

Browse files
committed
HPy: do not run the sandboxed tests in native mode
1 parent 91460cd commit 910cc65

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ def patch_batch_launcher(launcher_path, jvm_args):
758758
launcher.writelines(lines)
759759

760760

761-
def run_hpy_unittests(python_binary, args=None):
761+
def run_hpy_unittests(python_binary, args=None, include_native=True):
762762
args = [] if args is None else args
763763
with tempfile.TemporaryDirectory(prefix='hpy-test-site-') as d:
764764
env = os.environ.copy()
@@ -783,7 +783,10 @@ def run(self):
783783
except Exception as e: # pylint: disable=broad-except;
784784
self.exc = e
785785

786-
for abi in ['cpython', 'universal', 'debug', 'nfi']:
786+
abi_list = ['cpython', 'universal', 'debug']
787+
if include_native:
788+
abi_list.append('nfi')
789+
for abi in abi_list:
787790
env["TEST_HPY_ABI"] = abi
788791
threads.append(RaisingThread(target=run_python_unittests, args=(python_binary, ), kwargs={
789792
"args": args, "paths": [_hpy_test_root()], "env": env.copy(), "use_pytest": True, "lock": lock,
@@ -855,7 +858,7 @@ def graalpython_gate_runner(args, tasks):
855858

856859
with Task('GraalPython HPy sandboxed tests', tasks, tags=[GraalPythonTags.unittest_hpy_sandboxed]) as task:
857860
if task:
858-
run_hpy_unittests(python_managed_svm())
861+
run_hpy_unittests(python_managed_svm(), include_native=False)
859862

860863
with Task('GraalPython posix module tests', tasks, tags=[GraalPythonTags.unittest_posix]) as task:
861864
if task:

0 commit comments

Comments
 (0)