8000 gh-129980: Include test name in TSAN filename in multiprocess test ru… · python/cpython@3b548ad · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b548ad

Browse files
authored
gh-129980: Include test name in TSAN filename in multiprocess test runner (GH-129981)
1 parent 247b50d commit 3b548ad

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Lib/test/libregrtest/worker.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ def create_worker_process(runtests: WorkerRunTests, output_fd: int,
5656
if USE_PROCESS_GROUP and test_name not in NEED_TTY:
5757
kwargs['start_new_session'] = True
5858

59+
# Include the test name in the TSAN log file name
60+
if 'TSAN_OPTIONS' in env:
61+
parts = env['TSAN_OPTIONS'].split(' ')
62+
for i, part in enumerate(parts):
63+
if part.startswith('log_path='):
64+
parts[i] = f'{part}.{test_name}'
65+
break
66+
env['TSAN_OPTIONS'] = ' '.join(parts)
67+
5968
# Pass json_file to the worker process
6069
json_file = runtests.json_file
6170
json_file.configure_subprocess(kwargs)

0 commit comments

Comments
 (0)
0