use realpath instead of abspath
metrics_xml_format.py has a check to ensure that the given xml is located in the current checkout using GetPrimarySolutionPath(). The problem is that GetPrimarySolutionPath() adds "src" if the path doesn't end with "src". https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:gclient_paths.py;l=78-79 The workspace in Cog doesn't have "src" in the path. Instead, it creates a workspace at /..../$workspace_name/$repo_name, which doesn't match GetPrimarySolutionPath() because the workspace root doesn't end with 'src'. This must be a common problem in other modules, and Cog gets around this issue by creating a symlink, 'src', to the workspace root. This CL replaces os.path.abspath() with os.path.realpath() so that the check is done properly. Bug: b/369827156 Change-Id: Iaf56de0a9ccbd168004c4c80672c9dd18211bf5e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6094779 Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Scott Lee <ddoman@chromium.org>changes/79/6094779/2
parent
f548b21cd3
commit
ab3bfa4f96
Loading…
Reference in New Issue