Skip to content

Commit d4e082d

Browse files
committed
Run retagger in more similar environment to regular tagged test run
1 parent 1c05175 commit d4e082d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import re
3535
import shutil
3636
import sys
37+
3738
PY3 = sys.version_info[0] == 3 # compatibility between Python versions
3839
import tempfile
3940
if PY3:
@@ -225,7 +226,16 @@ def retag_unittests(args):
225226
parser.add_argument('--upload-results-to')
226227
parsed_args, remaining_args = parser.parse_known_args(args)
227228
with set_env(ENABLE_CPYTHON_TAGGED_UNITTESTS="true"):
228-
python(["graalpython/com.oracle.graal.python.test/src/tests/test_tagged_unittests.py", '--retag'] + remaining_args)
229+
with _dev_pythonhome_context():
230+
args = [
231+
'--experimental-options=true',
232+
'--python.CatchAllExceptions=true',
233+
'--python.WithThread=true',
234+
'--python.CAPI=' + _get_capi_home(),
235+
'graalpython/com.oracle.graal.python.test/src/tests/test_tagged_unittests.py',
236+
'--retag',
237+
]
238+
mx.run([python_gvm()] + args + remaining_args)
229239
if parsed_args.upload_results_to:
230240
with tempfile.TemporaryDirectory(prefix='graalpython-retagger-') as d:
231241
filename = os.path.join(d, 'unittest-tags-{}.tar.bz2'.format(sys.platform))
@@ -498,7 +508,7 @@ def graalpython_gate_runner(args, tasks):
498508
with Task('GraalPython Python tests', tasks, tags=[GraalPythonTags.tagged]) as task:
499509
if task:
500510
with set_env(ENABLE_CPYTHON_TAGGED_UNITTESTS="true", ENABLE_THREADED_GRAALPYTEST="true"):
501-
# the tagged unittests must ron in the dev_pythonhome and using
511+
# the tagged unittests must run in the dev_pythonhome and using
502512
# the dev CAPI, because that's where the tags are
503513
with _dev_pythonhome_context():
504514
run_python_unittests(

0 commit comments

Comments
 (0)