File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1219,9 +1219,18 @@ def graalpython_gate_runner(args, tasks):
12191219 finally :
12201220 jdk .java_args_pfx = prev
12211221 if report ():
1222- with tempfile .NamedTemporaryFile (delete = True , suffix = '.json.gz' ) as tmpfile :
1222+ tmpfile = tempfile .NamedTemporaryFile (delete = False , suffix = '.json.gz' )
1223+ try :
1224+ # Cannot use context manager because windows doesn't allow
1225+ # make_test_report to read the file while it is open for
1226+ # writing
12231227 mx .command_function ('tck' )([f'--json-results={ tmpfile .name } ' ])
12241228 mx_gate .make_test_report (tmpfile .name , GraalPythonTags .junit + "-TCK" )
1229+ finally :
1230+ try :
1231+ os .unlink (tmpfile .name )
1232+ except :
1233+ pass # Sometimes this fails on windows
12251234 else :
12261235 mx .command_function ('tck' )()
12271236
You can’t perform that action at this time.
0 commit comments