File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -452,12 +452,6 @@ def get_temp_dir(tmp_dir: StrPath | None = None) -> StrPath:
452452 f"unexpectedly returned { tmp_dir !r} on WASI"
453453 )
454454 tmp_dir = os .path .join (tmp_dir , 'build' )
455-
456- # When get_temp_dir() is called in a worker process,
457- # get_temp_dir() path is different than in the parent process
458- # which is not a WASI process. So the parent does not create
459- # the same "tmp_dir" than the test worker process.
460- os .makedirs (tmp_dir , exist_ok = True )
461455 else :
462456 tmp_dir = tempfile .gettempdir ()
463457
Original file line number Diff line number Diff line change @@ -127,6 +127,9 @@ def main() -> NoReturn:
127127 worker_json = sys .argv [1 ]
128128
129129 tmp_dir = get_temp_dir ()
130+ # get_temp_dir() can be different in the worker and the parent process.
131+ # For example, if --tempdir option is used.
132+ os .makedirs (tmp_dir , exist_ok = True )
130133 work_dir = get_work_dir (tmp_dir , worker = True )
131134
132135 with exit_timeout ():
Original file line number Diff line number Diff line change 1+ Fix a race condition in regrtest: make sure that the temporary directory is
2+ created in the worker process. Previously, temp_cwd() could fail on Windows if
3+ the "build" directory was not created. Patch by Victor Stinner.
You can’t perform that action at this time.
0 commit comments