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):
1219
1219
finally :
1220
1220
jdk .java_args_pfx = prev
1221
1221
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
1223
1227
mx .command_function ('tck' )([f'--json-results={ tmpfile .name } ' ])
1224
1228
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
1225
1234
else :
1226
1235
mx .command_function ('tck' )()
1227
1236
You can’t perform that action at this time.
0 commit comments