tools: fix how the relative path of the tests run by v test is formed, by removing ts.vroot only from beginning of the path (fix #24363) (#24467)

This commit is contained in:
Mike 2025-05-12 18:08:22 +03:00 committed by GitHub
parent 4578af33aa
commit 81b238e6f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -417,7 +417,7 @@ fn worker_trunner(mut p pool.PoolProcessor, idx int, thread_id int) voidptr {
cmd_options << ' -enable-globals' cmd_options << ' -enable-globals'
} }
if ts.root_relative { if ts.root_relative {
relative_file = relative_file.replace(ts.vroot + os.path_separator, '') relative_file = relative_file.replace_once(ts.vroot + os.path_separator, '')
} }
file := os.real_path(relative_file) file := os.real_path(relative_file)
mtc := MessageThreadContext{ mtc := MessageThreadContext{