diff options
author | Igor Kraskevich <kraskevich@google.com> | 2024-05-14 09:12:15 +0000 |
---|---|---|
committer | Igor Kraskevich <kraskevich@google.com> | 2024-05-14 09:17:54 +0000 |
commit | 4f0bb5ec9ab1584efef707d8f67ad159bd7597ad (patch) | |
tree | d766212da03105c53583bbf2c6beba0a4e76e593 | |
parent | 66c6c13fceda1ceec4dfebd03da76a9485a8e859 (diff) | |
download | perfetto-4f0bb5ec9ab1584efef707d8f67ad159bd7597ad.tar.gz |
Fix module name generation on Windows
On Windows the path can contain '/' or os.sep depending on how the script is executed. Which means that we need to replace both when generating the module name, otherwise we get consistent chromium CI win jobs failures like https://ci.chromium.org/ui/p/chromium/builders/try/win-rel/610267/overview
Bug: b/340202937
Change-Id: I6855eb9f46cd6c0373ddaad89dca7c82cc084ddd
-rwxr-xr-x | tools/gen_tp_table_headers.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/gen_tp_table_headers.py b/tools/gen_tp_table_headers.py index 6d7e044b5..c53602ede 100755 --- a/tools/gen_tp_table_headers.py +++ b/tools/gen_tp_table_headers.py @@ -70,7 +70,10 @@ def main(): return module_path[module_path.rfind(os.sep + 'src') + 1:] modules = [ - os.path.splitext(get_relin_path(i).replace('/', '.'))[0] + # On Windows the path can contain '/' or os.sep, depending on how this + # script is executed. So we need to replace both. + os.path.splitext( + get_relin_path(i).replace('/', '.').replace(os.sep, '.'))[0] for i in args.inputs ] headers: Dict[str, Header] = {} |